Visual Studio 2022 (+SonarLint) and C++ remote linux build in docker container

  • Operating system: Windows 10
  • IDE name and flavor/env: Visual Studio 2022 (version 17.2.3)
  • SonarLint plugin (for Visual Studio 2022): 6.5.0.48666
  • Is connected mode used: No
    • Connected to SonarCloud or SonarQube (and which version): -

We want to use the SonarLint plugin in Visual Studio 2022 with the “linux remote build”. We build our C++ Software with CMake on linux (yocto) in a docker container via SSH. The file sync in Visual Studio 2022 from windows to linux works and the build works but the SonarLint analysis always gives us 0 issues.

Can we use the SonarLint plugin with the linux remote build feature? (The compile_commands.json file is on linux and of course not on windows.)
If yes, do you have a description or an example? or another idea?

Hint: The property “buildRoot” is missing in the default linux remote build configuration that uses “remoteBuildRoot”. I have also added the “buildRoot” setting but it doesn’t work.

Thank you.

PS: We are currently using the SonarLint plugin in CLion and VS Code on Ubuntu (with CMake) and in Visual Studio 2017 (generated solution/projects during CMake step) on windows and it works. Now we want to try Visual Studio 2022 and the linux remote build with CMake (without the generated solution/projects)

Hello @coder-1,

At the moment we do not support remote tools in Visual Studio.
I’m changing your thread to New Feature suggestion so that people could vote for it. :slight_smile: