-
Notifications
You must be signed in to change notification settings - Fork 145
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
Do not generate module related properties in sonar-project.properties
#1888
Comments
We would need to double-check that everything works as expected when not generating these properties. For example, we need some project-level properties, which refer to modules in scanner terminology (e.g. TEST vs MAIN categorization). Also see https://sonarsource.atlassian.net/browse/SONAR-13756 |
Hi, I'm the one which initially reported this. tl;dr long story: This is a solution containing multiple projects, one for the frontend (javascript/ts), couple .NET libraries, test projects and an asp.net application. Such frontend projects exists solely for Sonarcloud, to capture both backend/frontend with one msbuild scan.
For all other (.NET) projects, the classification done by Sonarcloud is fine and works. When I remove both settings from the project file and set
If I also set
It seems to be related to the fact that all projects then look at the Repo root (a folder above them) for test context and ends up matching files twice. I also tried with |
We cannot simply remove this. While modules were deprecated on the Plugin API side, there's still nothing to replace the necessary functionality with. Such a change would require thorough specification and prototyping. As it would also immediately break support for the latest SQ LTS/LTA, especially on AzureDevOps side, we'd need to specify a strategy for that too. |
Since SonarQube 7.6, modules are deprecated.
Right now, for each project
.csproj
, we still generate module related properties:While it still works, there are properties that can sometimes generate warnings that confuse users, such as reported here.
The previous example will generate the following warning when invoking the scanner-cli during the end step:
Which is due to the
615D01B7-CB50-4152-8998-434C1ABC3516.sonar.test.inclusions
property in the file.Known workaround
Do not set properties in the
csproj
but as a CLI parameter.For the example above:
The text was updated successfully, but these errors were encountered: