- Operating system: Windows 11
- SonarLint plugin version: 4.12.0
- Programming language you’re coding in: C++ with maven as compiler
- Is connected mode used: yes
- Connected to SonarCloud or SonarQube (and which version): 9.9
And a thorough description of the problem / question:
Hi,
I’m running a dev container (docker) with the sonarlint plugin installed under Visual Studio code (version 1.90.2). And would like to use the compile commands database to analyze the project locally.
To do this I’m trying to run the build wrapper documented here: Running an analysis - SonarLint Documentation - VS Code (under heading Using Sonar’s Build Wrapper) where it specifies that a compile_commands.json
file will be outputted. Sadly I do not see that file, everytime I run the command I get two files; build-wrapper-dump.json
and build-wrapper.log
.
The command that I run is as follows:
build-wrapper-linux-x86-64 --out-dir ./dbWrapper mvn … [project specific parameters].
The project it self will build correctly without a problem (also while running the command) and see this back in the log file at the end Tue Nov 26 15:11:55 2024: returned with code: 0
.
So my question is; how can I create a compile_commands.json file using the build wrapper under a docker container (linux)? My colleague was already able to do this directly under windows using a msvc compiler but I would like to do it under windows using the GCC/G++ compiler.
Regards,
Wesley