Skip to content

Commit

Permalink
F# fix
Browse files Browse the repository at this point in the history
  • Loading branch information
daveaglick committed Dec 20, 2020
2 parents 87e80fe + b51255c commit 8d4ed30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Buildalyzer/AnalyzerResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,11 @@ internal void ProcessCscCommandLine(string commandLine, bool coreCompile)
return args;
}

public bool HasFscArguments()
{
return _fscCommandLineArguments?.Count > 0;
}

private static IEnumerable<string> EnumerateCommandLineParts(string commandLine, bool initialCommand)
{
StringBuilder part = new StringBuilder();
Expand Down
2 changes: 1 addition & 1 deletion src/Buildalyzer/Logging/EventProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private void MessageRaised(object sender, BuildMessageEventArgs e)
{
// Process the command line arguments for the Fsc task
AnalyzerResult result = _currentResult.Count == 0 ? null : _currentResult.Peek();
if (e.SenderName?.Equals("Fsc", StringComparison.OrdinalIgnoreCase) == true && !string.IsNullOrWhiteSpace(e.Message) && _targetStack.Any(x => x.TargetName == "CoreCompile") && _currentResult.Count != 0)
if (e.SenderName?.Equals("Fsc", StringComparison.OrdinalIgnoreCase) == true && !string.IsNullOrWhiteSpace(e.Message) && _targetStack.Any(x => x.TargetName == "CoreCompile") && _currentResult.Count != 0 && !result.HasFscArguments())
{
result.ProcessFscCommandLine(e.Message);
}
Expand Down

0 comments on commit 8d4ed30

Please sign in to comment.