classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

running checkstyle


From: Michael Koch
Subject: running checkstyle
Date: Wed, 16 Feb 2005 14:16:55 -0600
User-agent: Mutt/1.5.6+20040907i

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]