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.
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.
1. In your Eclipse-based IDE, open the Marketplace client.
2. Search for SonarLint, and select Install.
3. Restart your IDE.
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).
For example in Java, you can copy-paste this code snippet, with a typical bug when copy-pasting
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.
© 2015-2023, SonarSource S.A, Switzerland. Except where otherwise noted, content in this space is licensed under the GNU Lesser General Public License, Version 3.0. SONARLINT is a trademark of SonarSource SA. All other trademarks and copyrights are the property of their respective owners. See SonarSource.com for everything you need to know about the Sonar Solution.