Installation
On this page
For the most part, SonarLint can be installed directly from your IDE's Marketplace. Offline installations are also possible and previous versions are always available if needed.
Instructions
SonarLint for Eclipse is a plugin that can be installed in most Eclipse-based IDEs (including Spring Tool Suite, PyDev, and others). You can find the SonarLint for Eclipse IDE extension directly on the Eclipse Marketplace.
Using the Eclipse Marketplace client
1. In your Eclipse-based IDE, open the Marketplace client.
2. Search for SonarLint, and select Install.
3. Restart your IDE.
Using the Eclipse Install New Software wizard
If you can't use the Eclipse Marketplace client, you can still directly access the SonarLint update site. See the official Eclipse documentation for full details, and follow these instructions:
1. Go to Eclipse > Help and select Install New Software.
2. Select the Add... button to add a new repository pointing to https://eclipse-uc.sonarlint.org. Give the repository a meaningful name. Don't worry if you, can't open this URL in your web browser, Eclipse will automatically look for files compositeContent.xml and compositeArtifacts.xml.
3. Select both the newly added SonarLint repository and the SonarLint for Eclipse feature.
4. Review the features about to be installed, and select Finish.
5. When requested, restart your IDE
By using this method, you will be automatically notified of new updates of SonarLint (assuming you have allowed Eclipse to check for updates).
First taste of SonarLint
Now that you have SonarLint installed, open or create a new project containing source files in a programming language SonarLint can analyze out of the box: Java, PHP, Python, JavaScript or HTML.
For example in Java, you can copy-paste this code snippet, with a typical bug when copy-pasting for
loops:
If you open this Java file within the Eclipse Java editor, you should see SonarLint reporting the issue:
To get more details about the issue, you can simply hover on the issue location, and a popup will display the issue message:
There is also the possibility to use the SonarLint On-The-Fly feature to display the list of issues found by SonarLint. Simply open the view from the menu Windows > Show View > Other.
Was this page helpful?