Pages

Sunday, October 12, 2014

Java Style Guide

Checkstyle is a tool to facilitate the use of coding standard. It allows us to define a coding style, and it can then check if our code follows the style automatically.

Not surprisingly, there exists an Eclipse plugin for Checkstyle. The URL of Checkstyle update site is:

     http://eclipse-cs.sf.net/update/

This is a sample checkstyle.xml of Google's Java Style Guidegoogle_checks.xml

Note that google_checks.xml is created for CheckStyle(CS) 5.8, not for CS 5.7. Since the Eclipse Plugin for CheckStyle is integrated with CS 5.7 (as of 10/12/2014), we may need to wait until the plugin is migrated to CS 5.8.

No comments:

Post a Comment