Getting Started Offline Installation - kevin-hinz/sonarlint-docs-migration-render GitHub Wiki
Page Item: Offline installation
SLUG: getting-started-offline-installation
HEADING 1
Lorum ipsum
Eclipse
PLACE ECLIPSE CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET
For offline installation and older versions see the update site archive at https://binaries.sonarsource.com/SonarLint-for-Eclipse/releases/
Offline installation using the Eclipse Install New Software wizard
If you can't perform an online installation, you can use a SonarLint repository archive.
-
Manually download the latest archive (.zip) of the SonarLint repository from https://binaries.sonarsource.com/?prefix=SonarLint-for-Eclipse/releases/
-
Open Install New Software
- Click on the Add... button to add a new repository. Click on the Archive... button to select the zip file you have downloaded. Give the repository a meaningful name.
- Select the just added repository, and tick the SonarLint for Eclipse feature
- Review the features about to be installed, and click Finish
- When requested, restart you IDE
WARNINGBOX When using this method, you will not be notified for new updates of SonarLint.
IntelliJ
PLACE INTELLIJ CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET
In case you want to install SonarLint offline, you need to first get access to the plugin zip file.
You can download official versions on the marketplace, or sometimes an ad-hoc version can be built mainly for debugging purposes when a user reports a bug on our community forum.
To install the zip, you can go to File
> Settings
> Plugins
, click on the wheel at the right, then Install Plugin from Disk...
First taste of 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.
Visual Studio
PLACE VISUAL STUDIO CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET
Visual Studio Code
PLACE VISUAL STUDIO CONTENT HERE TO ENTERED INTO THE KONTENT.AI-SPECIFIC ASSET
In case you want to install SonarLint offline, you need to first get access to SonarLint's VSIX file.
You can download official versions on the Marketplace, or sometimes an ad-hoc version can be built mainly for debugging purposes when a user reports a bug on the Sonar Community forum.
To install the extension, use the dedicated command Extensions: Install from VSIX...
in the palette. Select the VSIX file in the explorer and install it.