-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started Installation
Page Item: Installation SLUG: getting-started-installation
Select the tab (collapsable box) below corresponding to your IDE:
PLACE ECLIPSE CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET
PLACE INTELLIJ CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET
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.
Search the marketplace from the IntelliJ IDE.
Go to File > Settings:

Then select the Plugins > Marketplace tab:

Then click OK and restart the IDE to finalize the installation.
You can now enjoy SonarLint!
Let's analyze a first source file and see what SonarLint can bring.
Copy paste this Java code snippet in a project. It contains a code smell because of duplicated methods:
package org.mycompany;
class MyClass {
private static final String CODE = "XXX";
public String calculateCode() {
doTheThing();
return CODE;
}
public String getName() {
doTheThing();
return CODE;
}
private void doTheThing() {
// do it
}
}If you open this Java file within the editor, you should see SonarLint reporting the issue by highlighting the text range.
You can hover on the highlight to get a short description of the issue.
If you want to read a more detailed explanation of the issue, we provide context actions. One of them will open the detailed rule description.
PLACE VISUAL STUDIO CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET
PLACE VISUAL STUDIO CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET