Hello,
I don t understand why it is so difficult to configure sonar qube.
I am configuring a sonar qube analysis through azure devops.
My working directory is /agent/_work/1/s
My code is in /agent/_work/1/s/project/src
.I have the prepare analysis on SonarQube
sonar.cfamily.cache.enabled=false
sonar.cfamily.build-wrapper-output=sonar-output
sonar.branch.name=refs/heads/main
sonar.projectKey=nxsoi.pressure
#sonar.exclusions=tools/**/*
sonar.scm.exclusions.disabled=true
sonar.sources=project/src
I use the build wrapper (linux for me)
“build-wrapper-linux-x86/build-wrapper-linux-x86-64” --out-dir sonar-output ./env-local.bash make
My build-wrapper-dump.json looks correct (not empty).
Then under azure devops pipeline, i am using the Run Coe Analysis .
But nothing is analyzed, as the json file was empty…
And i don t get why it fails.
INFO: Sensor CSS Rules [javascript] (done) | time=2ms
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend]
INFO: Sensor ThymeLeaf template sensor [securityjavafrontend] (done) | time=0ms
INFO: Sensor IaC Docker Sensor [iac]
INFO: 0 source files to be analyzed
INFO: 0/0 source files have been analyzed
INFO: Sensor IaC Docker Sensor [iac] (done) | time=56ms
INFO: Sensor Serverless configuration file sensor [security]
INFO: 0 Serverless function entries were found in the project
INFO: 0 Serverless function handlers were kept as entrypoints
INFO: Sensor Serverless configuration file sensor [security] (done) | time=4ms
INFO: Sensor AWS SAM template file sensor [security]
INFO: Sensor AWS SAM template file sensor [security] (done) | time=1ms
INFO: Sensor AWS SAM Inline template file sensor [security]
INFO: Sensor AWS SAM Inline template file sensor [security] (done) | time=1ms
INFO: Sensor CFamily [cpp]
INFO: CFamily plugin version: 6.41.0.60884
INFO: Using build-wrapper output: /home/shoareau/agent/_work/1/s/sonar-output/build-wrapper-dump.json
INFO: Available processors: 2
INFO: Using 2 threads for analysis, according to value of "sonar.cfamily.threads" property.
WARN:
"sonar.cfamily.cache.enabled" and "sonar.cfamily.cache.path" properties are deprecated.
Visit the documentation page for more information about analysis cache configuration
https://docs.sonarqube.org/9.9/analyzing-source-code/languages/c-family/
INFO: Cache is explicitly disabled: sonar.cfamily.cache.enabled=false
INFO: PCH: unique=0 use=0 (forceInclude=0,throughHeader=0,firstInclude=0) out of 0 (forceInclude=0,throughHeader=0)
INFO: SE: 0 out of 0
INFO: Z3 refutation rate: 0 out of 0
INFO: Subprocess(es) done in 88ms
INFO: 0 compilation units analyzed
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 14.469s
INFO: Final Memory: 37M/134M
INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
-
you are using the latest version of the build-wrapper and the CFamily analyzer
-
you are correctly invoking the scanner with correct configuration
-
your compiler is supported
-
you are wrapping your build correctly
-
you are wrapping a full/clean build
-
you are providing the path to the correct build-wrapper output directory
-
you are building and analyzing the same source checkout, absolute paths must be id
build-wrapper-dump.json (405.5 KB)