Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

SonarLint for Eclipse — Proactive Code Quality Checks

DZone's Guide to

SonarLint for Eclipse — Proactive Code Quality Checks

How to get started using SonarLint with Eclipse to get on-the-fly feedback on code quality issues while using the IDE.

· DevOps Zone
Free Resource

Download the blueprint that can take a company of any maturity level all the way up to enterprise-scale continuous delivery using a combination of Automic Release Automation, Automic’s 20+ years of business automation experience, and the proven tools and practices the company is already leveraging.

This blog talks about the SonarLint tool for Eclipse IDE, which can used by developers to get on-the-fly feedback for code quality issues while coding. This feature was always one of the most awaited features of Sonar and thankfully, it’s out there for Java, Javascript, and PHP developers to try for themselves.

The following is how to get started:

  • To download and install SonarLint for Eclipse from within Eclipse IDE, all you need to do is go to this page (http://www.sonarlint.org/eclipse/) and click on the “Marketplace” button which takes you to the install page. Drag and drop the “install” button into your eclipse workspace and it should start downloading and installing.
  • Restart Eclipse and you are all set.

I tested it with a HelloWorld program and got following code quality assistance. Note the information such as “Replace this usage of System.out or System.err by a logger”.

sonarlint_for_eclipse_helloworld

In the current version, SonarLint does not support integration with SonarQube server. The integration of SonarLint with SonarQube server would achieve some of the following objectives:

  • Each project could set their own code quality rules (or configure rules) in SonarQube server.
  • The project teams would then be able to validate their code using SonarLint against the rules set for that project team.

The above would help the developers avoid the code quality issues much before they appear in the Sonar dashboard.

Feel free to try it out or recommend it for your projects. The downside (as I have not yet tested) is that it may slow your environment because a background task always running and checking the code quality issue. However, you could disable this by right-clicking on the project and disabling SonarLint.

Download the ‘Practical Blueprint to Continuous Delivery’ to learn how Automic Release Automation can help you begin or continue your company’s digital transformation.

Topics:
sonar ,lint ,eclipse

Published at DZone with permission of Ajitesh Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}