SonarLint for Visual Studio Code 3.4 released - Support for C and C++

Dear C and C++ developers community,

SonarLint already helps you check that the C and C++ code you develop in Visual Studio, Eclipse, or CLion is clean, i.e. it serves the purpose it has been written for whilst at the same time ensuring a high level of security, maintainability and efficiency.

At the same time, we know many users prefer using VSCode for coding in C and C++, Indeed, adding C and C++ support to VSCode is today the #1 most requested SonarLint feature by our users in this Community Forum and in SonarLint roadmap page.

The waiting is finally over, as we’ve just released this new version of SonarLint for VSCode with C and C++ support included! For the time being, the projects built with CMake are supported.

Check out how easy it is to write cleaner C and C++ code: just install the plugin, ensure SonarLint knows where your compilation database is, then open any code file, start writing code and SonarLint will immediately detect and squiggle bugs, code smells and security issues.

SonarLint will not only detect issues: our accurate rule descriptions will help you understand what is at stake and guide you in fixing your issues with appropriate examples… In other words you will be empowered to fix your issues before they are even committed to your repository. For instance, you can have a look at our 500+ types of C++ detections here.

And there is more to it: SonarLint actively helps you fix your issue by providing quick fixes. For example if you code in C++ with VSCode, you can find here the list of C++ rules where quick fixes are supported (and keep in mind that this list is constantly growing). To learn more about our C++ quick fixes, you can watch this introductory video that was recorded in CLion.

And as usual with SonarLint, if your project is analyzed with SonarQube or SonarCloud, you can benefit from the same ruleset and project configuration as the other contributors thanks to the connected mode. Look out for improvements to analysis speed in this mode coming soon.

Here are a few more highlights from this release:

  • You’ll find 9 new rules to help you deliver efficient, error-free and safe regular expressions in PHP
  • We improved the performance of Python analysis by using serialized Typeshed symbols
  • We’ve added support for TypeScript 4.6

You can read more in our release notes

Once again our goal is to provide something really valuable for developers; the best way you can help with that is to leave us your feedback here so that we can always improve.

Here a few other ways to contact us:

6 Likes

This blog shall help people to configure their environment easier: SonarLint for C/C++ with Makefile support on VS-Code | Medium