I’m trying to configure my C project on Github to launch a scan on my project everytime I pull modifications on the main Branch.
For that I created sonar-project.properties file in the root of my project and an action.yaml file in the .github\workflows direcotry of my project.
To compile my project, we use Keil IDE µvision v5.33.
So to created a json file with build-wrapper-win-x86-64.exe, I used the following command line in a Windows PowerShell:
.\build-wrapper-win-x86-64.exe --out-dir wrapper-out C:\Keil_v5\UV4\UV4.exe -b .\SCP-SW-08-Application_Sources\SCP_APP\SCP_APP.uvprojx
I put the build-wrapper-dump.json and build-wrapper files in .\wrapper-out directory
I added the path in my sonar-project.properties.
When I did a pull request, the Scan is launched, but I’ve the following error: java.lang.IllegalStateException: java.nio.file.NoSuchFileException: /github/workspace/wrapper-output/build-wrapper-dump.json
I searched on the forum, it seems the json file directory is wrong in my sonar-project.properties file.
But when I look the SonarQube Scan log file, it seems to find it.
Do you have an idea where does come from my problem?
You need to make sure that the build-wrapper and build is happening in the same context as the analysis. You can’t copy a build wrapper dump from a local machine and expect it to work in the GitHub build environment.
Thank you for your anwser.
For my comprehension, is the Keil compiler and the build-wrapper need to be installed on the server ?
This point is not clear for me.
Thanks.
It seems I unlucky, the Keil µvision compiler seems not supported by SonarQube.
(C/C++/Objective-C)
Is a solution exist for the unsupported compilers ?
Is not possible to force SonarQube to use directly my json and log file directly stored in my Github project without to launch a new compilation and wrapper command?
Thanks.