Skip to content

Commit

Permalink
Fixed an NullReferenceException for F# projects
Browse files Browse the repository at this point in the history
  • Loading branch information
psfinaki authored and daveaglick committed Oct 31, 2022
1 parent da86d32 commit 071979f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Buildalyzer/AnalyzerResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public string GetProperty(string name) =>
&& !string.Equals(Path.GetFileName(x.Item2), "csc.exe", StringComparison.OrdinalIgnoreCase))
.Select(x => AnalyzerManager.NormalizePath(Path.Combine(Path.GetDirectoryName(ProjectFilePath), x.Item2)))
.ToArray() ?? _fscCommandLineArguments
?.Where(x => x.Item1 == null
?.Where(x => x.Item1 == null && x.Item2 != null
&& !x.Item2.Contains("fsc.dll")
&& !x.Item2.Contains("fsc.exe"))
.Select(x => AnalyzerManager.NormalizePath(Path.Combine(Path.GetDirectoryName(ProjectFilePath), x.Item2)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,7 @@ public void BuildsFSharpProject()

// Then
results.Count.ShouldBeGreaterThan(0, log.ToString());
results.First().SourceFiles.ShouldNotBeNull();
results.OverallSuccess.ShouldBeTrue(log.ToString());
results.ShouldAllBe(x => x.Succeeded, log.ToString());
}
Expand Down

0 comments on commit 071979f

Please sign in to comment.