SonarLint for IntelliJ

Overview

SonarLint IntelliJ Plugin

Build Status Quality Gate

SonarLint is an IDE extension that helps you detect and fix quality issues as you write code. Like a spell checker, SonarLint squiggles flaws so they can be fixed before committing code.

Useful links

How to install

You can install SonarLint from the JetBrains Plugin Repository, directly available in the IDE preferences.

Node.js >= 8.x is required to perform JavaScript or TypeScript analysis.

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. :-)

Contributing

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.

How to build

./gradlew buildPlugin

Note that the above won't run tests and checks. To do that too, run:

./gradlew check buildPlugin

For the complete list of tasks, see:

./gradlew tasks

How to run ITs

./gradlew :its:runIdeForUiTests &

The above will start an IDE instance with the SonarLint plugin. Wait for the UI robot server to start, then run the ITs:

./gradlew :its:check

Finally close the IDE.

To test against a specific version of IntelliJ, the ijVersion property can be used, e.g.:

./gradlew :its:runIdeForUiTests  -PijVersion=IC-2019.3 &
./gradlew :its:check

Please note that the IDE must be in foreground while tests are executed.

How to develop in IntelliJ

Import the project as a Gradle project.

Note: whenever you change a Gradle setting (for example in build.gradle.kts), don't forget to Refresh all Gradle projects in the Gradle toolbar.

To run an IntelliJ instance with the plugin installed, execute the Gradle task runIde using the command line, or the Gradle toolbar in IntelliJ, under Tasks/intellij. The instance files are stored under build/idea-sandbox.

Keep in mind that the clean task will wipe out the content of build/idea-sandbox, so you will need to repeat some setup steps for that instance, such as configuring the JDK.

Whenever you change dependency version, the previous versions are not deleted from the sandbox, and the JVM might not load the version that you expect. As the clean task may be inconvenient, an easier workaround is to delete the jars in the sandbox, for example with:

find build/idea-sandbox/ -name '*.jar' -delete

How to release

See release pipeline at Azure DevOps.

License

Copyright 2015-2021 SonarSource.

Licensed under the GNU Lesser General Public License, Version 3.0

Comments
  • Ignore rules locally

    Ignore rules locally

    Feature that allows you to ignore rules locally without changing the server's ruleset.

    I found some users requested something like this on StackOverflow.

    opened by YuleZ 5
  • Added settings to filter issues by severity and type

    Added settings to filter issues by severity and type

    Severity filtering might be useful when working on old projects, as there's usually quite a lot of issues, so it might be useful to filter out only the most critical ones and not be flooded with the low severity ones.

    opened by Zhabha 5
  • Increased maximum length of SonarQube server configuration items

    Increased maximum length of SonarQube server configuration items

    I tested the new version 2.0.0 and discovered that with that version we are unable to use our SonarQube in the company due to the restriction of the Server URL to 50 characters.

    Therefore this pull-request to increase this. What I asked myself is the reason to limit this setting to 50. Is this a limitation of the core library?

    opened by aguther 4
  • Made RulePanel allow horizontal scrolling

    Made RulePanel allow horizontal scrolling

    For some reason horizontal scrolling was disabled in the Rule Panel. I enabled it as some rules have quite extensive text that goes beyond the window borders. Having word wrap on HTML Editor Panes seems to be more complicated.

    opened by synthomat 3
  • SLI-310 Highlight info issues as weak warnings

    SLI-310 Highlight info issues as weak warnings

    In 2018 @dbmeneses made the change "Highlight info issues as weak warnings" for SLI-310. However, the change was incomplete as info issues are still highlighted identical to regular warnings. This is because the ProblemHighlightType must also be changed as well. image

    This is what the highlight would look like with these new settings. I actually couldn't get sonarlint to build (failed to resolve dependencies), so this screenshot is from a different plugin that I wrote using the same highlighting settings. image

    This change is important as without it, there are lint issues that we will be forced to disable to prevent them from drowning out more important issues.

    In SLI-309 it says "Users can always configure the way issues are shown in the settings." but I do not see how to do this, nor can I find any code implementing that feature.

    enhancement 
    opened by lbenedetto 1
Releases(7.3.0.59206)
Owner
SonarSource
Continuous Code Quality and Code Security
SonarSource
Intellij-platform-plugin-template - IntelliJ Platform Plugin Template

IntelliJ Platform Plugin Template TL;DR: Click the Use this template button and

null 0 Jan 1, 2022
Kirill Rakhman 4 Sep 15, 2022
IntelliJ Plugin for Android Parcelable boilerplate code generation.

IntelliJ/Android Studio Plugin for Android Parcelable boilerplate code generation This tool generates an Android Parcelable implementation based on fi

Michał Charmas 2.1k Dec 27, 2022
A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.

ADB Idea A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development. The following commands are provided: Uninst

Philippe Breault 2k Dec 28, 2022
IntelliJ / Android Studio plugin for Android Holo Colors

This project is not maintained anymore. Holo Colors doesn't make sense since the introduction of Material Design and the ability to set the primary co

Jérôme Van Der Linden 644 Nov 10, 2022
eventbus-intellij-plugin 3.8 0.0 L1 Java Plugin to navigate between events posted by EventBus.

eventbus-intellij-plugin Plugin to navigate between events posted by EventBus. Post to onEvent and onEvent to Post Install There are two ways. Prefere

Shinnosuke Kugimiya 315 Aug 8, 2022
Android Studio & IntelliJ Plugin for sort xml by name="xxx".

AndroidXmlSorter Android Studio & IntelliJ Plugin for sort xml by name="xxx". Options Insert space between difference prefix ('Snake Case', 'Camel Cas

Kaoru Tsutsumishita 102 Nov 29, 2022
An Android Studio / IntelliJ plug-in help you upload your apk or listing to Google Play.

DroidLane An Android Studio / IntelliJ plug-in help you upload your apk or listing to Google Play. Installation Open Android Studio or IntelliJ IDEA O

Jintin 24 Jul 26, 2021
IntelliJ plugin that provides some useful utilities to support the daily work with Gradle.

IntelliJ Gradle Utilities Plugin This IntelliJ plugin provides some useful utilities to support the daily work with Gradle. It's available on the offi

Marcel Kliemannel 6 Jul 29, 2022
IntelliJ-based IDEs Protobuf Language Plugin that provides Protobuf language support.

IntelliJ Protobuf Language Plugin Reference Inspired by protobuf-jetbrains-plugin and intellij-protobuf-editor. Descriptor IntelliJ-based IDEs Protobu

Kanro 72 Dec 7, 2022
Plugin for IntelliJ-based IDEs folding root files in the ProjectView

Foldable ProjectView The Foldable ProjectView is a plugin for the IntelliJ-based IDEs that lets you fold files located in the root of your project. Av

Jakub Chrzanowski 47 Dec 13, 2022
IntelliJ plugin that provides a modern and powerful byte code analyzer tool window.

IntelliJ Byte Code Analyzer Plugin This IntelliJ plugin provides a modern and powerful byte code analyzer tool window. Its supports Java, Kotlin, Groo

Marcel Kliemannel 29 Nov 9, 2022
✈️ IDE plugin for the IntelliJ platform which adds GitHub Copilot support. (VERY WIP)

JetBrains Copilot GitHub Copilot support for the IntellIJ Platform. Installation Download the latest release. Select the Install Plugin from Disk opti

Koding 155 Dec 10, 2022
A plugin that adds support for rs2asm files to IntelliJ.

Rs2Asm This plugin adds some simple features when interacting with rs2asm files. Features Syntax highlighting Autocompletion for label names and instr

Joshua Filby 3 Dec 16, 2021
Review crates with cargo-crev in IntelliJ IDEs

IntelliJ Crev Cargo crates review support using cargo-crev Installation Using IDE built-in plugin system: Settings/Preferences > Plugins > Marketplace

Aleksei Trifonov 4 Dec 31, 2021
Leader key for IntelliJ-based IDE's. Now IdeaVim-friendly!

Ataman Ataman - an elected leader of the Cossack troops and settlements Ataman is an Intellij Idea plugin for using leader key for bindings (almost li

Mikhail Levchenko 50 Dec 13, 2022
A simple IntelliJ project to demonstrate exception handling in coroutines

ExceptionHandling A simple IntelliJ project to demonstrate exception handling in coroutines NB:** launch coroutine builder type exceptions cannot be h

Felix Nzioki Savali 0 Nov 9, 2021
IntelliJ Platform Plugin Template

IntelliJ Platform Plugin Template is a repository that provides a pure template to make it easier to create a new plugin project (check the Creating a repository from a template article).

null 0 Nov 8, 2021
Use quiltflower in intellij

quiltflower-intellij-plugin Template ToDo list Create a new IntelliJ Platform Plugin Template project. Get known with the template documentation. Veri

Joseph Burton 25 Dec 2, 2022