Hi list,

perhaps some of you noticed that I worked with checkstyle on GNU
classpath again. I think you all should know how to use it to produce
better code with.

First install checkstyle and all its dependencies. On Debian systems
this can be done via:

  apt-get install checkstyle

(Note that checkstyle is currently in the contrib section of the archive.)

I use the following little script to have an app I can start:

  #!/bin/sh

  $jamvm -cp 
/usr/share/java/checkstyle.jar:/usr/share/java/commons-cli.jar:/usr/share/java/commons-beanutils.jar:/usr/share/java/commons-collections.jar:/usr/share/java/commons-logging.jar:/usr/share/java/antlr.jar:/usr/share/java/regexp.jar
 com.puppycrawl.tools.checkstyle.Main "$@"

(Sorry for the long line.)

Now you can run checkstyle in your classpath tree with this command:

  checkstyle -c scripts/checkstyle-config.xml <some java files>

Currently not much testcases are activated in the config and not all
should be activated. Some of them surely need to be discussed first on
this list here. But you all have a new toy to play with.

Have fun.


Michael


_______________________________________________
Classpath mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to