Hi.
Sonarqube is not reporting any bugs eventhough they are there in the cpp check report.
I am running this to get the cppcheck report
cppcheck --xml-version=2 xcipio/LIS/src/CLIENTLIB 2> xcipio/cpp_clientlib.xml
I have tried with xml version 1 as well
Sonar project properties is like this:
sonar.projectKey=my:full-xcipio-Xcipio_Feature_Dev_master-CLIENTLIB
sonar.projectName=full-xcipio-Xcipio_Feature_Dev_master-CLIENTLIB
sonar.sources=xcipio/LIS/src/CLIENTLIB
sonar.cxx.includeDirectories=ACEROOT/inc/ace,ACEROOT/inc/ace/os_include
sonar.sourceEncoding=UTF-8
sonar.profile=xcipio-sonar-way-rules
sonar.cxx.cppcheck.reportPath=/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/cpp_clientlib.xml
sonar.exclusions=**/CtapMediationMsg.C,**/EIMSValidationTestSuite.H
Analysis is successful but sonar scanner reports that it cannot find the files. When I do a 'ls' on the file, its very much there. I don't know what I'm doing wrong.
INFO: Searching reports by relative path with basedir '/home/support/jenkins/jenkins20/workspace/xcipio-workspace' and search prop 'sonar.cxx.cppcheck.reportPath'
INFO: Scanner found '1' report files
INFO: Parser will parse '1' report files
INFO: Processing report '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/cpp_clientlib.xml'
WARN: Cannot find the file '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/GenericMessageClass.C', skipping violations
WARN: Cannot find the file '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/Generic_BearerCapability.C', skipping violations
WARN: Cannot find the file '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/Generic_EncryptionInformation.C', skipping violations
WARN: Cannot find the file '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/Generic_NotificationDataList.C', skipping violations
WARN: Cannot find the file '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/Generic_OctetString.C', skipping violations
WARN: Cannot find the file '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/Generic_PacketInformation.C', skipping violations
WARN: Cannot find the file '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/Generic_Payload.C', skipping violations
WARN: Cannot find the file '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/Generic_TargetIdentity.C', skipping violations
WARN: Cannot find the file '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/IS41C_Class.C', skipping violations
INFO: Added report '/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/cpp_clientlib.xml' (parsed by: CppcheckParserV2)
INFO: CppCheck Errors processed = 0
INFO: Sensor CxxCppCheckSensor (done) | time=70ms
The files are there:
[
sup...@10.0.156.73 xcipio-workspace]$ ls /home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/GenericMessageClass.C
/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/GenericMessageClass.C
[
sup...@10.0.156.73 xcipio-workspace]$ ls /home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/Generic_Payload.C
/home/support/jenkins/jenkins20/workspace/xcipio-workspace/xcipio/LIS/src/CORE/GENMSG/lib/Generic_Payload.C
There are valid errors in the cpp report as well
<error id="arrayIndexOutOfBounds" severity="error" msg="Array 'printablePayloadStr[28]' accessed at index 35, which is out of bounds." verbose="Array 'printablePayloadStr[28]' accessed at index 35, which is out of bounds." cwe="119">
<location file="xcipio/LIS/src/CLIENTLIB/GENVOIP/GenClientLib/src/Generic_Payload.C" line="493"/>
Please help!