Hi,
I am trying to switch to Sonar 9.5. I dropped the sonar.cfamily.build-wrapper-output
setting from my sonar-project.properties
, deleted the sonar cache and the repository, checked everything out again and still get the following output when running the sonar scanner (4.7.0.2747) with -X:
09:44:32.265 DEBUG: 0 SAM template configuration files were found in the project. 0 SAM function entries were found in total. 0 were kept as potential entrypoints.
09:44:32.268 INFO: Sensor AWS SAM template file sensor [security] (done) | time=15ms
09:44:32.269 INFO: Sensor CFamily [cpp]
09:44:32.276 INFO: CFamily plugin version: 6.34.0.48468
09:44:32.297 ERROR:
One configuration property is expected, two were found:
"sonar.cfamily.build-wrapper-output"
"sonar.cfamily.compile-commands"
09:44:46.539 INFO: ------------------------------------------------------------------------
09:44:46.540 INFO: EXECUTION FAILURE
09:44:46.542 INFO: ------------------------------------------------------------------------
09:44:46.543 INFO: Total time: 2:49.426s
09:44:46.701 INFO: Final Memory: 40M/110M
09:44:46.702 INFO: ------------------------------------------------------------------------
09:44:46.703 ERROR: Error during SonarScanner execution
java.lang.UnsupportedOperationException:
One configuration property is expected, two were found:
"sonar.cfamily.build-wrapper-output"
"sonar.cfamily.compile-commands"
at com.sonar.cpp.plugin.CFamilySensor.process(CFamilySensor.java:267)
at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:203)
at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:64)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
at org.sonar.scanner.scan.SpringModuleScanContainer.doAfterStart(SpringModuleScanContainer.java:81)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.scan.SpringProjectScanContainer.scan(SpringProjectScanContainer.java:392)
at org.sonar.scanner.scan.SpringProjectScanContainer.scanRecursively(SpringProjectScanContainer.java:388)
at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:357)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:135)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
The only cfamily settings in my sonar-project.properties
are:
sonar.cfamily.cpp20=true
sonar.cfamily.threads=4
sonar.cfamily.compile-commands=build/compile_commands.json
sonar.cfamily.cache.enabled=true
sonar.cfamily.cache.path=sonar-cache
As you can see, the c plugin gets loaded and without telling me the files it is loading or where it is getting its config from, it just crashes. In the beginning of the log, it says
09:41:57.208 INFO: Scanner configuration file: C:\Jenkins\sonar-scanner\bin\..\conf\sonar-scanner.properties
09:41:57.244 INFO: Project root configuration file: C:\Jenkins\workspace\fms-app\sonar-project.properties
But neither file contains any build wrapper config. How can I fix this? Where could the build-wrapper-output
config come from?