SonarCFamily and 0 compilations units analyzed

Hi @mpaladin

Thank you for creating a dev ticket to support TI compiler. I don’t see enough traction for this compiler and do not expect a support for it anytime soon.

We have new projects starting now and I’d like to start enforcing sonar scans at the early stages so we do not accumulate too many violations while we wait. Are there other options we can use to get it to work at-least partially? Something is better than nothing :slight_smile:

For example, SonarLint on the IDE works perfectly. I understand it is a different product from the scanner, but is there a way for me to generate a build-wrapper output from SonarLint that can be used by the scanner? Or be able to upload the SonarLint report to the server (I understand the consequences of this, but if this was a work around I do not mind setting up SonarLint to work on the build server and upload the report to SonarQube).

Hi @sujeeth,

you can always try to use GCC or Clang in parallel to build your project for analysis purpose. Unfortunately there are no workarounds other than using a supported compiler, sorry about that.

Hi @mpaladin

I took one of our basic project that uses TI compiler, modified it so it can compile with GCC. Compilation is successful, SonarLint shows about 588 violations. Then I run the build-wrapper and sonar-scanner, everything says success but on the server I still see 0 violations. I guess I am missing something else.

Attached the build-wrapper and sonar-scanner logs.build-wrapper.log.txt (79.6 KB) build-wrapper-dump.json.txt (54.3 KB) sonar-scanner-log.txt (30.9 KB)

Please ignore my comment above, after setting the right filters I am able to see the violations on the server.

Hi @sujeeth,

great, I consider this topic closed.

Hello, I have the same problem with C++ code (0-compilations-units-analyzed). I know icc and clang compilers are supported. But clang++ or icpx are supported?? My C files are compiled with Clang (in my build-wapper log) and the C++ files are compiled with clang++ (in my build-wapper log). But only the C-files enables to have no 0 for compilations units analyzed. If I remove my C files, I have 0 for compilations units analyzed.