Checkstyle

Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. Its purpose is to automate the process of checking Java code, and to spare humans of this task.

The program checks for:

  • Javadoc comments are defined for class, interface, variable and method declarations.
  • Javadoc tags for a method match the actual code.
  • The file starts with a specified header. This is useful to ensure that a file has a copyright notice.
  • An @author tag exists for class and interface Javadoc comments. This can be turned off.
  • Format of variable names match specified regular
  • expressions. For examp le, can enforce that all static variables must start with "s".
  • Class/interface names format matches specified regular expressions.
  • Format of parameter names match a specified regular expression.
  • Variables that are not declared as private or protected.
  • Correct use of white space around binary and unary operators. For examp le, x -=- 1; is illegal, whereas x -= -1; is not.
  • Ensure {}'s are used for if/while/for/do constructs.
  • Lines are not longer than a specified length.
  • Lines do not contain tabs. Note: this check can be turned off.

Last updated 21 Nov, 2003


User level: Submit a level

User Rating:

Homepage

License(s) :

LGPL

Rate it!

 

About

Leadership
Requirements
  • ANTLR (http://www.antlr.org) (Use Requirement)
  • Jakarta regexp package (http://jakarta.apache.org/regexp) (Use Requirement)
Related Projects

Jlint

Versions

2.2

2.2 stable released 2002-05-10

User Community and Support

User guide included

General Resources
Support Resources

Development

Developer Resources
Bug Tracking Resources
 

Please send comments on these web pages to bug-directory@fsf.org, send other questions to info@fsf.org.

Copyright © 2000 - 2009 Free Software Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301, USA

The copyright licensing notice below applies to this text. Any software described in this text has its own copyright notice and license, which can usually be found in the distribution itself.

Permission is granted to copy, distribute, and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts.