Installation
On this page
For the most part, SonarQube for IDE can be installed directly from your IDE's Marketplace. Offline installations are also possible and previous versions are available if needed.
Instructions
SonarQube 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 sonarqube
, 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 SonarQube for Eclipse 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 SonarQube for Eclipse 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 SonarQube for Eclipse (assuming you have allowed Eclipse to check for updates).
First taste of SonarQube
Now that you have SonarQube for Eclipse installed, open or create a new project containing source files in a programming language that SonarQube for Eclipse can analyze out of the box: Java, PHP, Python, JavaScripts or HTML. See the Rules and languages page for a full list of available languages.
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 SonarQube for Eclipse 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 SonarQube for Eclipse On-The-Fly feature to display the list of issues found by SonarQube for Eclipse. Simply open the view from the menu Windows > Show View > Other.
Was this page helpful?