Sonarlint for VSCode - Support multiple build directories

Please provide

  • Operating system: Unubtu 20.04
  • SonarLint plugin version: v4.1.0
  • Programming language you’re coding in: c++
  • Is connected mode used: No
    • Connected to SonarCloud or SonarQube (and which version): N/A

And a thorough description of the problem / question:

Hello! We are using the cmake extension with the following settings change:
"cmake.buildDirectory": "${workspaceFolder}/build/${buildKit}/${buildType}"

This allows us to build debug and release in separate build folders, and allows us to split builds between kits for cross compilation. However, this means we generate multiple compile_commands.json files, and I can only seem to point sonarlint at one of them.

It is completely understandable that sonarlint doesn’t have access to the above variables as they are likely specific to the cmake tools extension, but hopefully this thread can either serve to educate me if multi-build folder support already exists in another form, or serve as a discussion for proper support of such a feature.

Thank you so much for an awesome product!

Hello @Justin_Davis

Welcome to our community.
We do support ${workspaceFolder} but we do not support ${buildKit} and ${buildType} .

You are not the first user to ask for this.
We will put up a card on Productboard soon.

In the meantime, I record your interest.

Cheers

2 Likes

Thank you for the response! I look forward to seeing any progress made.

Justin

1 Like