Please provide
- Operating system: Linux, Windows
- SonarLint plugin version: 4.11.1
- Programming language you’re coding in: C, C++
- Is connected mode used:
- Connected to: SonarQube Developer Edition v10.6
According to this article in order to analyze C and C++ code with SonarLint, it is necessary to generate a compilation database. The article then presents alternatives to do so, including the use of the build system (CMake in my case) or Sonar’s Build Wrapper.
However the article does not recommend either method. Are there reasons why I should prefer using Sonar’s Build Wrapper to generate compilation databases for C/C++ projects using CMake, or will SonarLint work equivalently well (in terms of coding feedbacks) if I simply use the CMAKE_EXPORT_COMPILE_COMMANDS
feature of CMake?
Additionally, what is the answer to the same question for analysis run in a SonarQube server?