For the most part, SonarLint can be installed directly from your IDE's Marketplace. Offline installations are also possible and previous versions are always available if needed.
SonarLint for VS Code can be installed like any other VS Code extension as explained in the VS Code documentation. The standard installation workflow for VSCode, VSCodium, GitHub Codespaces, and GitPod among others, is as follows:
- Select the Extensions icon in the left sidebar of VS Code.
sonarlintin the search bar.
- Select Install.
Once the installation is complete, select the Reload Required button to complete the process.
Using the standard method, SonarLint will be downloaded from:
- the Microsoft Visual Studio Marketplace for VSCode and GitHub Codespaces.
- the OpenVSX community marketplace, for VSCodium and GitPod.
As an alternative, the VSIX package for any given version can be downloaded from the /sonarlint-vscode Release page on GitHub and installed using the
Install from VSIX command in accordance with Microsoft’s Install from a VSIX instructions.
Now that you have SonarLint installed, open or create a new project containing source files in a programming language SonarLint can analyze out of the box. See the Rules page for languages that work with your IDE.
SonarLint for VS Code offers a walkthrough to help you make the best out of it SonarLint; it covers the basic features to help you:
- see issues in your code.
- learn more about those issues and fix them.
- synchronize the analysis configuration with other contributors.
- diagnose problems and share feedback with the SonarLint team.
The walkthrough will be automatically displayed when you install SonarLint for the first time, and you can manually open it anytime from the command palette: search Welcome Open Walkthrough…, then select Welcome to SonarLint! to have a look!
By default, SonarLint for VS Code will update automatically as soon as a new release is published. However, SonarLint will not update automatically for users who intentionally pin a previous version of the extension.
© 2015-2023, SonarSource S.A, Switzerland. Except where otherwise noted, content in this space is licensed under the GNU Lesser General Public License, Version 3.0. SONARLINT is a trademark of SonarSource SA. All other trademarks and copyrights are the property of their respective owners. See SonarSource.com for everything you need to know about the Sonar Solution.