SonarLint for Visual Studio Code

Finally, SonarLint added C++ support for Visual Studio Code:

sadly, atm only CMake projects are supported.

As far as I understand, PlatformIO is a build system, as CMake is. Am I right in assuming that there is no chance getting it to run in PIO?

Maybe someone knows a similar solution for advanced code checking (beside the basic project inspection → check code)?

PIO already supports a bunch of linting / code checker tools, but not SonarLint. Best to open a new issue at Issues · platformio/platformio-core · GitHub.

Done :slight_smile:

1 Like

After I had a discussion at the Github issue (few weeks ago, very busy atm) that it could work with PIO, I have opened a ticket on the Sonar forums.

Here the response of a member of the team was:

I would better check in Support for SonarLint in Visual Studio Code · Issue #4219 · platformio/platformio-core · GitHub why temporary response files end up in the compilation database. It is not a good practice that temporary response files appear in the compilation database as those files may not be available.

Post on Sonar forums

Maybe someone here knows something about it?


while generating the compilation database, can you set it to not use response files? Are you able to generate a compilation database with the response files expanded?

is what keeps it from working properly, please note that in the already opened issue.