Add TSP diagnostic for binlog usage

This commit is contained in:
Tamas Vajk
2024-06-28 09:40:41 +02:00
parent c8927447f5
commit 4db586f17d
2 changed files with 28 additions and 0 deletions

View File

@@ -116,6 +116,20 @@ namespace Semmle.Autobuild.CSharp
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;
});
}

View File

@@ -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
}
}