Checkstyle

Checkstyle
Checkstyle
Stable release 5.5 / November 5, 2011; 16 days ago (2011-11-05)
Written in Java
Operating system Cross-platform
Type Static code analysis
License Lesser GNU General Public License
Website http://checkstyle.sourceforge.net

Checkstyle[1] is a static code analysis tool used in software development for checking if Java source code complies with coding rules.

Contents

Advantages and limits

The programming style adopted by a software development project can help to comply with good programming practices which improve the code quality, readability, re-usability, and reduce the cost of development. The performed checks mainly limit themselves to the presentation and don't analyze content, and do not confirm the correctness or completeness of the program. In practice, it can be fastidious to comply with all the style constraints, some of which could possibly harm the programming stages' dynamic; so, it may be useful to determine which level of check is needed for a certain type of program.

Examples of available modules

Checkstyle defines a set of available modules, each of which provides rules checking with a configurable level of strictness (mandatory, optional...). Each rule can raise notifications, warnings, and errors.

It permits to check for instance:

  • Javadoc comments for classes, attributes and methods;
  • Naming conventions of attributes and methods;
  • Limit of the number of function parameters, line lengths;
  • Presence of mandatory headers;
  • The use of packets imports, of classes, of scope modifiers and of instructions blocks;
  • The spaces between some characters;
  • The good practices of class construction;
  • Duplicated code sections[2];
  • Multiple complexity measurements, among which expressions.

Usage

Checkstyle is built in a JAR file which can run inside a Java VM or as an Apache Ant task. It can also integrate into an IDE or other tools.

A Checkstyle plug-in can provide new functionalities, like:

  • overload syntax coloring or decorations in code editor;
  • decorate the project explorer to highlight problem-posing resources;
  • add warnings and errors outputs to the outputs.

Thus, the developer can directly access to the code parts highlighted by Checkstyle.

History

Checkstyle, originally developed by Oliver Burn back in 2001, is maintained by a team of several developers around the world.

The current stable release is version 5.3[3] which is targeted towards the Java 5 language.

See also

References




Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Checkstyle — est un outil de contrôle de code, utilisé en développement de logiciel. Il permet de vérifier le style d un code source écrit en langage Java. Sommaire 1 Intérêt et limites 2 Exemples de modules disponibles 3 Utilisation …   Wikipédia en Français

  • ANT (Apache) — Apache Ant Pour les articles homonymes, voir ant. Ant …   Wikipédia en Français

  • Ant (Apache) — Apache Ant Pour les articles homonymes, voir ant. Ant …   Wikipédia en Français

  • Ant (logiciel) — Apache Ant Pour les articles homonymes, voir ant. Ant …   Wikipédia en Français

  • Apache Ant — Pour les articles homonymes, voir ant. Ant …   Wikipédia en Français

  • List of tools for static code analysis — This is a list of significant tools for static code analysis.Historical products* Lint the original static code analyzer of C code.Open source or Noncommercial products .NET (C#, VB.NET and all .NET compatible languages) *… …   Wikipedia

  • Java Et Logiciel Libre — Java est libre et open source (depuis le 13 novembre 2006 voir plus loin), et sa licence à permis l éclosion d un grand nombre d outils libres dans les domaines les plus variés. Sommaire 1 Discussion sur la licence de Java 2 Licence… …   Wikipédia en Français

  • Java et logiciel libre — Java est libre et open source (depuis le 13 novembre 2006 voir plus loin), et sa licence à permis l éclosion d un grand nombre d outils libres dans les domaines les plus variés. Sommaire 1 Discussion sur la licence de Java 2 Licence… …   Wikipédia en Français

  • Maven — Desarrollador Apache Software Foundation http://maven.apache.org …   Wikipedia Español

  • Règles de codage — Les règles de codage sont un ensemble de règles à suivre pour uniformiser les pratiques de développement logiciel, diffuser les bonnes pratiques de développement et éviter les erreurs de développement classiques au sein d un groupe de… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”