Skip to content

Commit 80d3455

Browse files
committed
Fix lint errors
1 parent 6d2e9bf commit 80d3455

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

OptimizelySDK/Config/DatafileProjectConfig.cs

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public enum OPTLYSDKVersion
103103
public string Datafile { get; set; }
104104

105105
/// <summary>
106-
/// Configured host name for the Optimizely Data Platform.
106+
/// Configured host name for the Optimizely Data Platform.
107107
/// </summary>
108108
public string HostForOdp { get; private set; }
109109

@@ -492,8 +492,7 @@ private static DatafileProjectConfig GetConfig(string configData)
492492
!(((int)supportedVersion).ToString() == config.Version)))
493493
{
494494
throw new ConfigParseException(
495-
$@"This version of the C# SDK does not support the given datafile version: {
496-
config.Version}");
495+
$@"This version of the C# SDK does not support the given datafile version: {config.Version}");
497496
}
498497

499498
return config;
@@ -632,8 +631,7 @@ public Variation GetVariationFromKey(string experimentKey, string variationKey)
632631
return _VariationKeyMap[experimentKey][variationKey];
633632
}
634633

635-
var message = $@"No variation key ""{variationKey
636-
}"" defined in datafile for experiment ""{experimentKey}"".";
634+
var message = $@"No variation key ""{variationKey}"" defined in datafile for experiment ""{experimentKey}"".";
637635
Logger.Log(LogLevel.ERROR, message);
638636
ErrorHandler.HandleError(
639637
new InvalidVariationException("Provided variation is not in datafile."));
@@ -655,8 +653,7 @@ public Variation GetVariationFromKeyByExperimentId(string experimentId, string v
655653
return _VariationKeyMapByExperimentId[experimentId][variationKey];
656654
}
657655

658-
var message = $@"No variation key ""{variationKey
659-
}"" defined in datafile for experiment ""{experimentId}"".";
656+
var message = $@"No variation key ""{variationKey}"" defined in datafile for experiment ""{experimentId}"".";
660657
Logger.Log(LogLevel.ERROR, message);
661658
ErrorHandler.HandleError(
662659
new InvalidVariationException("Provided variation is not in datafile."));
@@ -678,8 +675,7 @@ public Variation GetVariationFromId(string experimentKey, string variationId)
678675
return _VariationIdMap[experimentKey][variationId];
679676
}
680677

681-
var message = $@"No variation ID ""{variationId
682-
}"" defined in datafile for experiment ""{experimentKey}"".";
678+
var message = $@"No variation ID ""{variationId}"" defined in datafile for experiment ""{experimentKey}"".";
683679
Logger.Log(LogLevel.ERROR, message);
684680
ErrorHandler.HandleError(
685681
new InvalidVariationException("Provided variation is not in datafile."));
@@ -704,8 +700,7 @@ public Variation GetVariationFromIdByExperimentId(string experimentId, string va
704700
var message = $@"No variation ID ""{variationId
705701
}"" defined in datafile for experiment ""{experimentId}"".";
706702
Logger.Log(LogLevel.ERROR, message);
707-
ErrorHandler.HandleError(
708-
new InvalidVariationException("Provided variation is not in datafile."));
703+
ErrorHandler.HandleError(new InvalidVariationException("Provided variation is not in datafile."));
709704
return new Variation();
710705
}
711706

@@ -788,9 +783,7 @@ public string GetAttributeId(string attributeKey)
788783
if (hasReservedPrefix)
789784
{
790785
Logger.Log(LogLevel.WARN,
791-
$@"Attribute {attributeKey} unexpectedly has reserved prefix {
792-
RESERVED_ATTRIBUTE_PREFIX
793-
}; using attribute ID instead of reserved attribute name.");
786+
$@"Attribute {attributeKey} unexpectedly has reserved prefix {RESERVED_ATTRIBUTE_PREFIX}; using attribute ID instead of reserved attribute name.");
794787
}
795788

796789
return attribute.Id;

OptimizelySDK/Event/Builder/EventBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ public virtual LogEvent CreateImpressionEvent(ProjectConfig config, Experiment e
242242
GetImpressionOrConversionParamsWithCommonParams(commonParams,
243243
new object[] { impressionOnlyParams });
244244

245-
var region = !string.IsNullOrEmpty(config.Region) ? config.Region: "US";
245+
var region = !string.IsNullOrEmpty(config.Region) ? config.Region : "US";
246246

247247
return new LogEvent(EventFactory.EventEndpoints[region], impressionParams, HTTP_VERB, HTTP_HEADERS);
248248
}
@@ -270,7 +270,7 @@ public virtual LogEvent CreateConversionEvent(ProjectConfig config, string event
270270
var conversionParams =
271271
GetImpressionOrConversionParamsWithCommonParams(commonParams, conversionOnlyParams);
272272

273-
var region = !string.IsNullOrEmpty(config.Region) ? config.Region: "US";
273+
var region = !string.IsNullOrEmpty(config.Region) ? config.Region : "US";
274274

275275
return new LogEvent(EventFactory.EventEndpoints[region], conversionParams, HTTP_VERB, HTTP_HEADERS);
276276
}

0 commit comments

Comments
 (0)