Install Free
VS Code | Getting started | Installation

Installation

On this page

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.

Instructions

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:

  1. Select the Extensions icon in the left sidebar of VS Code. 
  2. Enter sonarlint in the search bar.
  3. Select Install.
How to find SonarLint in the VS Code Extension Marketplace.


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

First taste of SonarLint

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!

The Welcome to SonarLint introduction walkthrough screen.
The Welcome to SonarLint introduction walkthrough screen.

Updating SonarLint in VS Code

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.


Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARQUBE, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License