danielmp
(Daniel Pearson)
March 22, 2022, 3:00am
1
Hi I am trying to configure SonarQube for analysis on some C/C++ applications and all of them are failing to scan.
SonarQube Version: 8.9.7.52159
build-wrapper, version 6.20.3 (win-x86-64)
SonarScanner 4.6.0.2311
Here is my build-wrapper output and sonar-project file in the zip below. As you can see from the dump.json there are plenty of files to scan.
configuration.zip (98.0 KB)
So far, I have found out that removing /Tc or /Tp from the cl.exe command line arguments in the dump.json will allow it to run but it does not give a proper analysis (no issues found)
So I am wondering if this fix ([CPP-3096] Add support for MSVC /Tc, /Tp, /TC and /TP options (to force C or C++ language) - SonarSource ) is in my version of SonarQube or if I am doing something wrong in my setup?
danielmp
(Daniel Pearson)
March 22, 2022, 8:17am
2
After investigation, it turns out the problem comes from the fact that the CFamily plugin does not support absolute paths in cygwin style for include directories and compilation units.
Here is the ticket to fix that problem: CPP-3044 .
A workaround is to write the include directories and compilation unit paths either with a relative path or with a windows style path.
I found my solution here.
This is the issue: [CPP-3044] Improve Cygwin support by translating compilation units and user includes in unix style form - SonarSource
Issue is the pathing in the Cygwin environment, I needed to alter the dump.json file to follow the windows pathing.
Any timeframe for CPP-3044 to be resolved?
1 Like
danielmp
(Daniel Pearson)
March 22, 2022, 9:28am
3
Also wanted to asked where can I get build-wrapper 6.21, currently my SonarQube 8.9.7LTS will only give me the 6.20.3 version