-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCAN4NET-88 INFO level for invalid project GUIDs messages #2205
SCAN4NET-88 INFO level for invalid project GUIDs messages #2205
Conversation
e18aff1
to
a060a22
Compare
a060a22
to
f89f860
Compare
@@ -145,7 +145,7 @@ Error: {1}</value> | |||
<value>Failed to resolve path relative to project file. Path: {0}</value> | |||
</data> | |||
<data name="WPIF_MissingOrInvalidProjectGuid" xml:space="preserve"> | |||
<value>The project does not have a valid ProjectGuid. Analysis results for this project will not be uploaded. Project file: {0}</value> | |||
<value>Sonar: The project does not have a valid ProjectGuid. Analysis results for this project will not be uploaded. Project file: {0}</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we log messages during project build, we prefix them with "Sonar:". The message will appear in the following form:
SonarWriteProjectData:
Sonar: The project does not have a valid ProjectGuid. Analysis results for this project will not be uploaded. Project file: D:\src\playgroud\AzureFunctions\AzureFunctions\obj\Debug\net8.0\WorkerExtensions\WorkerExtensions.csproj
Sonar: (WorkerExtensions.csproj) Project processed successfully
@@ -106,7 +106,7 @@ public override bool Execute() | |||
} | |||
else | |||
{ | |||
Log.LogWarning(Resources.WPIF_MissingOrInvalidProjectGuid, FullProjectPath); | |||
Log.LogMessage(MessageImportance.High, Resources.WPIF_MissingOrInvalidProjectGuid, FullProjectPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to set high importance so the message will be displayed even when dotnet build
is called without a verbosity parameter.
The logs will look like this:
Determining projects to restore...
All projects are up-to-date for restore.
WorkerExtensions -> D:\src\playgroud\AzureFunctions\AzureFunctions\obj\Debug\net8.0\WorkerExtensions\buildout\Microsoft.Azure.Functions.Worker.Extensions.dll
Sonar: The project does not have a valid ProjectGuid. Analysis results for this project will not be uploaded. Project file: D:\src\playgroud\AzureFunctions\AzureFunctions\obj\Debug\net8.0\WorkerExtensions\WorkerExtensions.csproj
Sonar: (WorkerExtensions.csproj) Project processed successfully
AzureFunctions -> D:\src\playgroud\AzureFunctions\AzureFunctions\bin\Debug\net8.0\AzureFunctions.dll
Sonar: (AzureFunctions.csproj) Project processed successfully
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
SCAN4NET-88
Part of https://sonarsource.atlassian.net/browse/SCAN4NET-59