We are using Sonarqube Jenkins plug-in to perform code scan. We encountered the problem in which the scan is run successfully, able to detect the compilation database JSON but zero file analyzed.
- Jenkins version: 2.303.2
- SonarQube Scanner for Jenkins: 2.14
- Jenkins slave node OS: Linux
- Sonarqube host is using Developer edition : version 9.0
A bit of background:
Our C language software uses a ESP32 related compiler which Sonarqube build wrapper does not support. As such, we tried using the Compilation Database approach. We used Bear tool to generate the Compilation Database JSON file ( We could not use CMAKE )
We setup the Sonarqube on our Jenkins (using Jenkins Sonarqube plug-in) and perform the scanning on the same Jenkins workspace in which we build our software. However, we got the following error as shown below in picture, indicating 0 files analyzed.
Interestingly, when we installed the community version locally in the same PC where the source code resides and perform scan using the same Compilation Database file residing in the same machine, it works.
Appreciate if anyone could advise what may need to be tweaked in order to get the Sonar working. Thanks