Skip to content

Commit fdf0349

Browse files
authored
Fixed compile warnings.
1 parent 1a2be72 commit fdf0349

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SourceGenerator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ public void Execute(GeneratorExecutionContext context)
4545
ReadCommentHandling = JsonCommentHandling.Skip,
4646
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
4747
});
48-
if (string.IsNullOrEmpty(options.AssemblyType))
48+
if (string.IsNullOrEmpty(options!.AssemblyType))
4949
{
5050
throw new GenerationFailedException("AssemblyType should not be null or an empty string.");
5151
}
5252

53-
var splitted = options.AssemblyType!.Contains(".") ? options.AssemblyType.Split('.') : new string[] { };
53+
var splitted = options!.AssemblyType!.Contains(".") ? options!.AssemblyType.Split('.') : new string[] { };
5454
var splittedLen = splitted.Length;
5555
var usingStr = new StringBuilder();
5656
var gitinformationNamespace = "Elskom.Generic.Libs";
@@ -75,8 +75,8 @@ public void Execute(GeneratorExecutionContext context)
7575
this.RunGit("describe --all --always --dirty", Directory.GetParent(gitBuildInfoJsonFile.Path).FullName),
7676
this.RunGit("rev-parse --short HEAD", Directory.GetParent(gitBuildInfoJsonFile.Path).FullName),
7777
this.RunGit("name-rev --name-only HEAD", Directory.GetParent(gitBuildInfoJsonFile.Path).FullName),
78-
splittedLen > 0 ? splitted[splittedLen - 1] : options.AssemblyType,
79-
options.IsGeneric ? "<>" : string.Empty));
78+
splittedLen > 0 ? splitted[splittedLen - 1] : options!.AssemblyType,
79+
options!.IsGeneric ? "<>" : string.Empty));
8080
}
8181

8282
private string RunGit(string arguments, string workingDirectory)

0 commit comments

Comments
 (0)