Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code standard (not style) enforcer for Eclipse

Is there some coding standard enforcer for use with Eclipse (a plugin or something)? I know I can use "Window > Preferences > [Language] > Code Style" to suggest conventions, but these are not enforced.

In other words, I want Coding standard violations to be marked as "Errors" and Coding style violations as "Warnings".

Thanks and regards, Karthick S.

like image 901
Karthick S Avatar asked Dec 12 '22 10:12

Karthick S


2 Answers

You got several options to do that :

  • PMD http://pmd.sourceforge.net/eclipse/
  • Eclipse Checkstyle http://checkstyle.sourceforge.net/
  • Findbugs http://findbugs.sourceforge.net/
  • You can also integrate these plugins with your CI Server, for example Sonar For Hudson. Note that since 2011, Hudson has changed it's name to Jenkins. http://wiki.hudson-ci.org/display/HUDSON/Sonar+plugin
like image 180
Rudy Avatar answered Dec 26 '22 15:12

Rudy


Eclipse checkstyle plugin should do this :)

like image 44
aseychell Avatar answered Dec 26 '22 14:12

aseychell