Connected to SonarCloud or SonarQube (and which version): SonarQube 10.5
After following SonarSource Build Wrapper and SonarScanner for C/C++/Objective-C documentation, I’m unable to configure Build Wrapper. I’m unsure whether I need to configure it for Windows or for use with the Makefiles that CCS (Code Composer Studio) uses for compilation. The error I’m getting when running [SONARSOURCE BUILD-WRAPPER] failed to execute MSBuild.exe /t:Rebuild /nodeReuse:False: The system cannot find the file specified.
How can I configure SonarQube for Eclipse (Code Composer Studio) to work with C language?"
Hi, I did that but problems keep popping up. I want to use SonarLint in Code Composer Studio, which is essentially Eclipse. I’ve installed everything, but errors persist.
I’ve managed to connect Eclipse with SonarQube from my organization, but the code doesn’t appear in SonarQube. Additionally, I can’t get SonarLint to apply the corresponding rules. Moreover, there are some problems that I can’t figure out how to solve. For instance:
java.lang.IllegalStateException: Unable to read file C:\xxx\yyyy\file with charset UTF-8
or
File to analyze was not found in the file system: file:/C:/xxxx/.sonarlint/connectedMode.json
I need to have SonarLint installed in Code Composer, and the tutorials I’ve followed on the website haven’t been optimal, as the build wrapper can’t be configured, or I don’t know how to do it, to work in Windows environments and compile with the makefiles it generates automatically in each Texas Instruments code build.
We used, Windows with code composer 12.7 and the compiler version is 20.2.7
The first objective is to perform the analysis with the SonarScanner. To use the SonarScanner, I do it through Docker, for which I configure the following bash script:
The second part is to integrate SonarLint into Code Composer Studio. The issue is that I’ve already connected it to the server and entered the token, and it shows as green, but when I put a division by 0 in the code, it doesn’t detect it.
I’ve moved this thread to the SonarQube category, since analysis is the first objective.
The docs are pretty clear that analyzing C and C++ isn’t supported with the Docker image:
Important notes
The Build Wrapper collects information about the build, including absolute file paths (source files, standard headers, libraries, etc…). Later on, SonarScanner CLI uses this information and needs to access those paths. While this is straightforward when running these two steps on the same host, it is worth considering when using any containerization. A consequence of this is that C/C++/Objective-C analysis is NOT supported by SonarScanner CLI Docker image
But just extract the compiler options. I’m trying with the commands provided in the instructions for setting up the build-wrapper, but I still can’t get it to work. How can I make it work?