简体   繁体   中英

Is there a Java coding standards? If so, is there a tool that will check for those standards?

Are there Java coding standards? If so, is there a tool that implements and checks for those standards? I'm not familiar but hoping that someone has used Sonar, Checkstyle, PMD, Findbugs, Clover, and/or Cobertura that could tell me if any of those tools or other tools can do that.

Yes . All of those tools can enforce coding styles (and more).

Sun's (now Oracle's) coding conventions documentation is here:

http://www.oracle.com/technetwork/java/codeconv-138413.html

I've used Checkstyle to verify that my code follows these conventions as well as conventions adopted by organizations that I've worked for.

IntelliJ can enforce coding styles and standards as well. Its Inspector can also check for possible bugs as you write code.

Yes all these tools will do what you want. You can also add custom rules if you need to. You can also get checkstyle and findbugs plugin for Eclipse.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM