Skip to content

Commit

Permalink
Add TSP diagnostic for binlog usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tamasvajk committed Jun 28, 2024
1 parent c892744 commit 4db586f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
14 changes: 14 additions & 0 deletions csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,20 @@ private BuildScript AddBuildlessStartedDiagnostic()
markdownMessage: "C# was extracted with build-mode set to 'none'. This means that all C# source in the working directory will be scanned, with build tools, such as Nuget and Dotnet CLIs, only contributing information about external dependencies.",
severity: DiagnosticMessage.TspSeverity.Note
));
// For the time being we are adding an additional message regarding the binlog usage. In the future, we might want to remove the buildless messages altogether when the binlog option is specified.
if (actions.GetEnvironmentVariable(CSharpAutobuildOptions.ExtractorOptionBinlog) is not null)
{
AddDiagnostic(new DiagnosticMessage(
Options.Language,
"buildless/binlog",
"C# was extracted with the experimental 'binlog' option",
visibility: new DiagnosticMessage.TspVisibility(statusPage: true, cliSummaryTable: true, telemetry: true),
markdownMessage: "C# was extracted with the experimental 'binlog' option.",
severity: DiagnosticMessage.TspSeverity.Note
));
}
return 0;
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,17 @@
"telemetry": true
}
}
{
"markdownMessage": "C# was extracted with the experimental 'binlog' option.",
"severity": "note",
"source": {
"extractorName": "csharp",
"id": "csharp/autobuilder/buildless/binlog",
"name": "C# was extracted with the experimental 'binlog' option"
},
"visibility": {
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}

0 comments on commit 4db586f

Please sign in to comment.