CSC108/A08H -- Automatic style checking

This page contains the set of instructions needed to automatically check that your coding style conforms to the required style rules including javadoc comments. Assignments 2 and 3 require the use of javadoc @param, @return and @throw tagged comments in addition to descriptive javadoc comments.

Checkstyle

You will need Checkstyle, which is an open-source style-checking program.

After it unzips you should have a folder called "checkstyle-3.5".

RunCheck.jar

Now download RunCheck.jar (you may need to right-click to save it), which is a graphical interface to Checkstyle. Also download a2Checks (again, you may need to right-click to save it), which contains the style rules for A2.

Double-click on RunCheck.jar. It should show a window with 4 buttons across the top. Before it will work you need to tell it where your checkstyle information is:

Running a style check

You are now ready to style-check a Java file.

You can also check your entire directory at once.

Important Warnings

While this code will help eliminate style problems, it will not identify every problem. For example, it will not catch these problems: