kishore535
(Sai Kishore Reddy Rapolu)
February 21, 2022, 6:37pm
1
Hello Team,
I am running this sonarqube from my project and I am getting this error. It is not able to scan the c/c++ code. The scanner is running fine but not able to scan the c/c++ code.
Here is the configuration:
sonar.host.url=http://172.20.40.114:8443
sonar.projectKey=ssgsonarqube
sonar.projectName=SSG
sonar.projectVersion=1.0
Your relative path to source folder may be different
sonar.sources=/home/builds/tsd-jenkins-be/nightly-builds/ssg
sonar.cfamily.build-wrapper-output=/home/builds/sonarqube/ssg/build_output
sonar.java.binaries=.
Encoding of the source files
sonar.sourceEncoding=UTF-8
We are also running the build-wrapper as:
build-wrapper-linux-x86-64 --out-dir /home/builds/sonarqube/ssg/build_output make all
attached the build-wrapper.log and build-wrapper-dump.json files
build-wrapper.log (362.0 KB)
build-wrapper-dump.json (26.5 KB)
marco.b
(Marco B)
February 23, 2022, 10:45am
3
Hello @kishore535 ,
Looking at the output of the build wrapper, it seems only the linking step was captured. To properly analyze your project, you need to capture all build commands. To achieve this, it is best to do a clean build.
Analysis Steps Using Build Wrapper gives an example for make:
build-wrapper-linux-x86-64 --out-dir build_wrapper_output_directory make clean all
Given your build command, you may want to add clean before all if it is properly defined in your Makefile.
I also see you used a full path for the sonar.sources property. It is best practice to use a relative path instead.
I hope this helps.
system
(system)
Closed
June 2, 2022, 12:34pm
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.