Sonar-scanner C code analysis publish successful and uploaded but no issues in sonqube webapp

(Farrukh Najmi) #1

I am analyzing a C project with sonar-scanner- During the scan I see lots of WARN: messages emitted showing that the analysis is finding real problems in code. Here is an example:

16:39:33.336 WARN: [C:\Users\fnajmi\my-c-project\Reg_XE.h:42]:    syntax error: extern volatile UINT8 PORTA @ ( 0x00 ) 
16:39:33.336 WARN: [C:\Users\fnajmi\my-c-project\Reg_XE.h:43]:    syntax error: extern volatile UINT8 PORTB @ ( 0x01 ) 

At the end of the scanner’s emitted output I see encouring log messages suggesting scan was successful and report was uploaded:

16:39:34.743 DEBUG: Detection of duplications for XXX:CanInterfaceIOEXP.c
16:39:34.751 INFO: CPD calculation finished
16:39:35.737 INFO: Analysis report generated in 971ms, dir size=825 KB
16:39:36.005 INFO: Analysis reports compressed in 268ms, zip size=268 KB
16:39:36.005 INFO: Analysis report generated in C:\Users\fnajmi\my-c-project\.scannerwork\batch-report
16:39:36.005 DEBUG: Upload report
16:39:37.333 DEBUG: POST 200 | time=1328ms
16:39:37.337 INFO: Analysis report uploaded in 1332ms
16:39:37.338 INFO: ANALYSIS SUCCESSFUL, you can browse

When I go to the sonarqube webapp I find no issues reported other than code duplication issues.

Clearly something is being uploaded because code duplication is reported. But no other type of code issues are reported.

Note that I am using the SonarOpenCommunity/sonar-cxx plugin and have the C Sonar Way quality profile associated with the project.

What am I missing that is causing no code issues to be reported other than code duplication? I am guessing it is some server config that is missing for project.

(Farrukh Najmi) #2

I have posted an answer to this question here:

(G Ann Campbell) #3


For the record, questions about the Cxx analyzer should be taken directly to that community. We can’t help with that here.