Home - kevin-hinz/sonarlint-docs-migration-render GitHub Wiki

Page Item: Home

SLUG: index

SonarLint

SonarLint is a free and open-source IDE plugin that helps developers find and fix issues in real-time as they code, enhancing productivity and code quality, and reducing technical debt. Supporting over 20 languages and 11 IDEs, SonarLint leverages over 5,000 coding and language-specific rules to instantly highlight bugs, vulnerabilities and code smells, and provides contextual guidance on how to fix them.

Sonar’s IDE extensions are available for IntelliJ (and other JetBrains IDEs), VS Code, Visual Studio, and Eclipse and can analyze up to 25 different languages, and can be installed directly from your IDE's plugin marketplace.

Much like a spellchecker, SonarLint highlights problems in your code using error squiggles, provides quick fixes, and gives you detailed information about issues found in your code.

In Connected Mode, SonarLint becomes part of the full Sonar solution that integrates code analysis throughout your development process from IDE to CI pipeline to DevOps platform, helping to make sure that only Clean Code makes it into your project.

Writing clean code

Writing clean code is essential to maintaining a healthy codebase. We define clean code as code that meets a certain defined standard, i.e. code that is reliable, secure, maintainable, readable, and modular, in addition to having other key attributes. This applies to all code: source code, test code, infrastructure as code, glue code, scripts, and more.

Sonar's Clean as You Code approach eliminates many of the pitfalls that arise from reviewing code at a late stage in the development process. The Clean as You Code approach uses your quality gate to alert/inform you when there’s something to fix or review in your new code (code that has been added or changed), helping you to maintain high standards and focus on code quality.

Developing with Sonar

The Sonar solution performs checks at every stage of the development process:

  • SonarLint provides immediate feedback in your IDE as you write code so you can find and fix issues before a commit.
  • Then, SonarQube and SonarCloud analyze your pull requests before you merge them, providing another layer of protection against code issues.
  • Finally, SonarQube and SonarCloud analyze your code on each build, as part of your CI/CD workflow and together with Sonar Quality Gates, keep code with issues from being released to production.

The Sonar solution helps you incorporate the Clean as You Code methodology, enabling you to focus on submitting new, clean code for production, knowing that your existing code will be improved over time.

Have a look at the types of issues that SonarLint detects and browse a full list of Sonar Rules and Rule Descriptions available for static code analysis.

Learn more

Check out the entire suite of Sonar products: SonarQube, SonarCloud, and SonarLint.

Staying connected

You can get help in our online community.

Languages Overview

Lorum ipsum, lorum ipsum.

Languages

tabbed

Eclipse

PLACE ECLIPSE CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET

  • (for Java, JavaScript, PHP, Python and HTML)

tabbed

IntelliJ

SonarLint for the JetBrains family currently supports C#, C, C++, CSS, HTML, Java, JavaScript, Kotlin, PHP, Python, Ruby, TypeScript, and XML programming languages.

You can unlock Scala and Swift when using Connected Mode with SonarQube or SonarCloud.

Please see this table for a full list of languages supported by each JetBrains IDE:

INSERT TABLE HERE

For more details about languages and new features under consideration for the JetBrains family IDEs, please refer to the SonarLint roadmap where we list all of our coming soon and newly released features.

Supported languages

SonarLint for IntelliJ provides out of the box support for the following languages:

  • Java
  • JavaScript/TypeScript
  • Kotlin
  • PHP
  • Python
  • Ruby
  • HTML
  • XML

More languages can be supported by binding your project to SonarQube or SonarCloud

tabbed

Visual Studio

PLACE VISUAL STUDIO CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET

  • VS SUPPORTS THESE RULES: (for C#, VB.NET, JavaScript, TypeScript, C and C++)

Check the rules to see what SonarLint can do for you:

By default SonarLint runs in standalone mode i.e. completely independent of SonarQube/SonarCloud. Simply open a project containing C#, VB, C++, JS or TS files.

For C# and VB.Net, new issues will be reported as you type. You do not have to select 'Run Code Analysis' from the 'Analyze' menu - the rules are run automatically. Note: by default, VS is configured to only run Roslyn analyzers on files that are currently open. You can choose to have the analysis run on the entire solution as described in the Microsoft docs, although this is obviously more processor-intensive.

For C, C++, JavaScript and TypeScript, new issues will be reported when you open or save a file. Issues are highlighted in your code, and also listed in the 'Error List'.

You can access the detailed rule description directly from the issue in the Error List, using the Show Error help option on the contextual menu.

tabbed

Visual Studio Code

PLACE VISUAL STUDIO CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET

  • (for Java, JavaScript, PHP, Python and HTML)