Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension): 9.9.0 LTS, sonar-scanner 4.8.0.2856, Ubuntu 20.04
- how is SonarQube deployed: Helm
- what are you trying to achieve: Scan a second project
- what have you tried so far to achieve this: It works, but there’s a bug in sonar-scanner
Description:
- We have a
sonar-project.properties
with some default settings. - Since we’re migrating to Bazel, but haven’t fully migrated I added a
<project>-bazel
next to my project in SonarQube. - Running analysis with
-Dsonar.projectKey=<project>-bazel
still posts the results to<project>
. - All other CLI options overwrite the file options (as expected).
Workaround:
Replacing sonar.projectKey
in sonar-project.properties
with sed
works.