Eclipse Checkstyle
One thing that I have been working on lately is trying to put together a proposal for the developer environment at work. This involves the various programs that the developers would use. This includes things like Java IDEs, database access tools, UML modeling tools, and others. One of the cooler tools that I have been playing with is Checkstyle 4.0.
Checkstyle is a Java library that checks your Java code against a set of rules. These rules can encompass everything from variable naming rules to method lengths to the use of whitespace to declaring all method arguments as final and everything in between. The coolest thing about checkstyle is that it works as an Ant target. This means that everytime you do a build it checks your code for problems.
Along with Checkstyle I have also been playing with a plug-in that integrates Checkstyle directly into Eclipse called Eclipse Checkstyle Plug-in (catchy name). The nice thing about the plug-in is that each time you do a save it checks the file that you are working on a displays the errors in the editor for you. This allows for instant feedback. The only problem that I have found so far is that the base set of checks that are included with Eclipse Checkstyle do not match the source code formatting rules setup in Eclipse. This means that if you want to use the plug-in you are going to have to spend sometime synching the two together. Otherwise, evertime you format your code you will introduce a ton of style errors.
Hi,
I read your comment about the Eclipse Checkstyle Plugin (catchier name suggestions welcome ;-)).
As a dev for the said plugin I am very interested in your suggestions for the plugin.
For starters I created a RFE to provide a base configuration that matches the default eclipse formatting style.
Cheers,
Lars