All Projects → SonarSource → Sonarlint Vscode

SonarSource / Sonarlint Vscode

Licence: lgpl-3.0
SonarLint for Visual Studio Code

Programming Languages

typescript
32286 projects

Labels

Projects that are alternatives of or similar to Sonarlint Vscode

Vscode Proto3
vscode extension for proto3
Stars: ✭ 171 (-13.2%)
Mutual labels:  vscode
Vscode Journal
Lightweight journal and simple notes support for Visual Studio Code
Stars: ✭ 174 (-11.68%)
Mutual labels:  vscode
Vscode Vlang
V Language extension for Visual Studio Code.
Stars: ✭ 190 (-3.55%)
Mutual labels:  vscode
Zsh In Docker
Install Zsh, Oh-My-Zsh and plugins inside a Docker container with one line!
Stars: ✭ 169 (-14.21%)
Mutual labels:  vscode
Svn Scm
SVN support for VS Code
Stars: ✭ 172 (-12.69%)
Mutual labels:  vscode
Vscode Java Test
Run and debug Java test cases in Visual Studio Code.
Stars: ✭ 177 (-10.15%)
Mutual labels:  vscode
Nim
Streamline Your Node.js Debugging Workflow with Chromium (Chrome, Edge, More) DevTools.
Stars: ✭ 168 (-14.72%)
Mutual labels:  vscode
Prettier Plugin Tailwind
Sort tailwind classes in HTML with Prettier.
Stars: ✭ 192 (-2.54%)
Mutual labels:  vscode
Vscode Live Frame
Run your web app inside VS Code
Stars: ✭ 173 (-12.18%)
Mutual labels:  vscode
Open In Editor
NPM package to open a file in editor
Stars: ✭ 187 (-5.08%)
Mutual labels:  vscode
Vscodium
binary releases of VS Code without MS branding/telemetry/licensing
Stars: ✭ 14,639 (+7330.96%)
Mutual labels:  vscode
Langserver Swift
A Swift implementation of the open Language Server Protocol.
Stars: ✭ 171 (-13.2%)
Mutual labels:  vscode
Vscode Jest
The optimal flow for Jest based testing in VS Code
Stars: ✭ 2,357 (+1096.45%)
Mutual labels:  vscode
Vscode Vite
One step faster for Vite in VS Code ⚡️
Stars: ✭ 168 (-14.72%)
Mutual labels:  vscode
Night Owl Vscode Theme
🌌 NIGHT OWL: A VS Code dark theme for contrast for nighttime coding, 🦉 LIGHT OWL: a daytime light theme
Stars: ✭ 2,368 (+1102.03%)
Mutual labels:  vscode
Vscode Twitch Highlighter
This is a VS Code extension that will allow your Twitch chat to highlight a line of code via a command message. Example: `!line 8 server.js`. See master branch README.md for more details
Stars: ✭ 169 (-14.21%)
Mutual labels:  vscode
Vscode Chrome Debug
Debug your JavaScript code running in Google Chrome from VS Code.
Stars: ✭ 2,126 (+979.19%)
Mutual labels:  vscode
Flutter preview
Flutter | Because a widget-driven development requires a widget-driven preview.
Stars: ✭ 197 (+0%)
Mutual labels:  vscode
Vscode Azurefunctions
Azure Functions extension for VS Code
Stars: ✭ 191 (-3.05%)
Mutual labels:  vscode
Codetour
VS Code extension that allows you to record and playback guided tours of codebases, directly within the editor.
Stars: ✭ 1,139 (+478.17%)
Mutual labels:  vscode

SonarLint for Visual Studio Code

SonarLint is a free IDE extension that lets you fix coding issues before they exist! Like a spell checker, SonarLint highlights Bugs and Security Vulnerabilities as you write code, with clear remediation guidance so you can fix them before the code is even committed. SonarLint in VS Code supports analysis of JavaScript, TypeScript, Python, Java, HTML & PHP code, and you can install it directly from the VS Code Marketplace!

How it works

Simply open a JS, TS, Python, Java, HTML or PHP file, start coding, and you will start seeing issues reported by SonarLint. Issues are highlighted in your code, and also listed in the 'Problems' panel.

sonarlint on-the-fly

You can access the detailed rule description directly from your editor, using the provided contextual menu.

rule description

Static Analysis Rules

Out of the box, SonarLint automatically checks your code against the following rules:

The full list of available rules is visible in the "SonarLint Rules" view in the explorer, where you can activate and deactivate rules to match your conventions. SonarLint will also show a code action on each issue to quickly deactivate the corresponding rule.

Requirements

The SonarLint language server needs a Java Runtime (JRE) 8 or 11. If one is already installed on your computer, SonarLint should automatically find and use it.

If a suitable JRE cannot be found at the usual places, SonarLint will ask for your permission to download and manage its own version.

Finally, you can explicitly set the path where the JRE is installed using the sonarlint.ls.javaHome variable in VS Code settings. For instance:

{
    "sonarlint.ls.javaHome": "C:\\Program Files\\Java\\jre1.8.0_131"
}

To analyze JavaScript and TypeScript, SonarLint will also need Node.js.

To enable the support for Java, you need the Language support for Java VSCode extension (version 0.56.0 or higher).

The support for Apex and PL/SQL is only available together with SonarQube/SonarCloud. For Apex, you'll also need the Salesforce Extension Pack VSCode extension.

Connected mode

You can connect SonarLint to SonarQube >= 6.7 or SonarCloud and bind your workspace folders to a SonarQube/SonarCloud project to benefit from the same rules and settings that are used to inspect your project on the server. SonarLint then hides in VSCode the issues that are marked as Won’t Fix or False Positive.

Connected mode will also allow to unlock analysis of those languages:

The first step is to configure connection details (user token, SonarQube server URL or SonarCloud organization). For security reasons, the token should not be stored in SCM with workspace settings. That's why we suggest to configure them in VSCode user settings.

Example for SonarQube:

{
    "sonarlint.connectedMode.connections.sonarqube": [
        { "serverUrl": "https://sonarqube.mycompany.com", "token": "<generated from SonarQube account/security page>" }
    ]
}

Example for SonarCloud:

{
    "sonarlint.connectedMode.connections.sonarcloud": [
        { "organizationKey": "myOrgOnSonarCloud", "token": "<generated from https://sonarcloud.io/account/security/>" }
    ]
}

The second step is to configure the project binding, either at workspace level, or in every workspace folders. Example:

{
    "sonarlint.connectedMode.project": {
        "projectKey": "the-project-key"
    }
}

If you plan to use multiple connections, to different SonarQube servers and/or SonarCloud organizations, simply give a unique connectionId to each entry, and use them as reference in the binding.

Example:

// In user settings
{
    "sonarlint.connectedMode.connections.sonarqube": [
        { "connectionId": "mySonar", "serverUrl": "https://sonarqube.mycompany.com", "token": "xxx" }
    ]
    "sonarlint.connectedMode.connections.sonarcloud": [
        { "connectionId": "myOrgOnSonarCloud", "organizationKey": "myOrg", "token": "yyy" }
    ]
}

// In project1/.vscode/settings.json
{
    "sonarlint.connectedMode.project": {
        "connectionId": "mySonar",
        "projectKey": "the-project-key-on-sq"
    }
}

// In project2/.vscode/settings.json
{
    "sonarlint.connectedMode.project": {
        "connectionId": "SonarCloud",
        "projectKey": "the-project-key-on-sc"
    }
}

Configuring a project binding at the workspace level mutes Won’t Fix and False Positive issues in any of the project's sub-folders added to the workspace.

In connected mode with SonarCloud or any commercial edition of SonarQube, SonarLint receives notifications about Quality Gate changes and new issues. This feature can be toggled using the disableNotifications field in a server connection definition.

SonarLint keep server side data in a local storage. If you change something on the server such as the quality profile, you can trigger an update of the local storage using the "SonarLint: Update all project bindings to SonarQube/SonarCloud" command on the command palette (search for "sonarlint").

Contributions

If you would like to see a new feature, please create a new thread in the forum "Suggest new features".

Please be aware that we are not actively looking for feature contributions. The truth is that it's extremely difficult for someone outside SonarSource to comply with our roadmap and expectations. Therefore, we typically only accept minor cosmetic changes and typo fixes.

With that in mind, if you would like to submit a code contribution, please create a pull request for this repository. Please explain your motives to contribute this change: what problem you are trying to fix, what improvement you are trying to make.

Make sure that you follow our code style and all tests are passing.

Have Question or Feedback?

For SonarLint support questions ("How do I?", "I got this error, why?", ...), please first read the FAQ and then head to the SonarSource forum. There are chances that a question similar to yours has already been answered.

Be aware that this forum is a community, so the standard pleasantries ("Hi", "Thanks", ...) are expected. And if you don't get an answer to your thread, you should sit on your hands for at least three days before bumping it. Operators are not standing by. :-)

Issue tracker (readonly): https://jira.sonarsource.com/browse/SLVSCODE

License

Copyright 2017-2021 SonarSource.

Licensed under the GNU Lesser General Public License, Version 3.0

Data and telemetry

This extension collects anonymous usage data and sends it to SonarSource to help improve SonarLint functionality. No source code nor IP address is collected, and SonarSource does not share the data with anyone else. Collection of telemetry is controlled via the setting: sonarlint.disableTelemetry. Click here to see a sample of the data that are collected.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].