神刀安全网

SonarLint for Eclipse — Proactive Code Quality Checks

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.

Mar. 27, 16 · DevOps Zone

Comment ( 0 )

Save

{{ articles[0].views | formatCount}} Views

  • Edit
  • {{ articles[0].isLocked ? ‘Enable’ : ‘Disable’ }} comments
  • {{ articles[0].isLimited ? ‘Remove comment limits’ : ‘Enable moderated comments’ }}

The DevOps Zone is brought to you in partnership with New Relic .  Download 5 Unsung Tools of DevOps to see which tools make the cut and why.

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 — Proactive Code Quality Checks

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.

The DevOps Zone is brought to you in partnership with New Relic .  Read about where DevOps started and how the adoption rate went from tiny startups to giant Fortune 500 enterprises.

Topics:

sonar, lint, eclipse

Published at DZone with permission of Ajitesh Kumar , DZone MVB .

Opinions expressed by DZone contributors are their own.

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » SonarLint for Eclipse — Proactive Code Quality Checks

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
分享按钮