diff --git a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs index 61487eb43858..36feaec47265 100644 --- a/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs +++ b/csharp/autobuilder/Semmle.Autobuild.CSharp/CSharpAutobuilder.cs @@ -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; }); } diff --git a/csharp/ql/integration-tests/all-platforms/binlog/diagnostics.expected b/csharp/ql/integration-tests/all-platforms/binlog/diagnostics.expected index 19390ed2af26..1a10ae9ded54 100644 --- a/csharp/ql/integration-tests/all-platforms/binlog/diagnostics.expected +++ b/csharp/ql/integration-tests/all-platforms/binlog/diagnostics.expected @@ -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 + } +}