Multiple compile_commands.json

  • Operating system: Ubuntu 20.04
  • SonarLint plugin version: v3.18.0
  • Programming language you’re coding in: C++
  • Is connected mode used:
    • Connected to SonarCloud or SonarQube (and which version): SonarQube

For a folder/workspace with multiple compile_commands.json is it not possible to configure for multiple compile_commands.json files?
Is it not possible to use clangd as a backend via this example .clangd configuration file? CompilationDatabase checks those directories for a compile_commands.json if the file matches that above wildcard path.

---
If:
  PathMatch: ScriptingService/.*

CompileFlags:
  CompilationDatabase: build_ScriptingService
---
If:
  PathMatch: TestClient/.*

CompileFlags:
  CompilationDatabase: build_TestClient
---
If:
  PathMatch: UcmTestApp/.*

CompileFlags:
  CompilationDatabase: build_UcmTestApp

Hello @davidj361 and welcome to the community!

Thank you for your question.
Yes, today we support only one compile_commands file per workspace folder.
We have a section of the forum called Project Manager for a Day. You can post your proposal for this improvement there and we will discuss including it in our roadmap.

2 Likes