The Artima Developer Community
Sponsored Link

Java Buzz Forum
Checkstyle, a victim of its early success

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic    
Flat View: This topic has 0 replies on 1 page
Oliver Burn

Posts: 30
Nickname: oburn
Registered: Jun, 2003

Oliver Burn is a solutions architect for KAZ Technology Services.
Checkstyle, a victim of its early success Posted: Jun 9, 2003 1:24 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Oliver Burn.
Original Post: Checkstyle, a victim of its early success
Feed Title: Oliver's Blog
Feed URL: http://sedoparking.com/search/registrar.php?domain=®istrar=sedopark
Feed Description: Contains the rantings of me. The thoughts are all personal and do not reflect at all on the companies I work for. (mumble: damn lawyers!)
Latest Java Buzz Posts
Latest Java Buzz Posts by Oliver Burn
Latest Posts From Oliver's Blog

Advertisement

When I started work on the open-source version of Checkstyle in 2000, I planned to make it a tool to find as many problems as possible before code reviews (and you do code reviews, don't you? ;). And sometimes it may even be used as a substitue for code reviews - on the theory that something is better than nothing.

I tend to follow the rule of going after low-hanging fruit, so the initial emphasis went into checking the easy stuff like the use of braces and the proper use of whitespace. IMHO, probably the best early stuff was the support for checking Javadoc comments and naming conventions.

Unfortunately to this day most people think this is all that Checkstyle does. The other day a friend of mine referred to the Checkstyle 2.4 release as being the ""Gold Release", which is all people ever use. But this is far from the truth, as Checkstyle has evolved a long way since then.

One of the major problems with the early version of Checkstyle was the architecture. It was not easy for other people to develop their own checks, and plug them into Checkstyle. This meant that new checks had to be developed mainly by myself and Lars. So in the long-term it was not good approach.

When PMD appeared on the scene, it was clear that a cleaner architecture could be achieved. I remember discussing with Lars whether we should effectively stop work on Checkstyle and port our checks into PMD. In the end we decided not to because one of the advantages of Checkstyle over PMD is that is much faster. So it became a challenge to come up with an architecture for Checkstyle that would support plug-ins as easily as PMD, but not suffer the performance costs. In the end we jointly came up with an optimised visitor pattern which formed the core of Checkstyle 3.

The benefits of this change can be clearly seen now. The number of committers for the project has grown from 2 to 4. The number of checks available has grown significantly to include checks for common coding problems, class design techniques and other miscellaneous checks. The other day we received a contribution containing over 20 checks that are going to be incorporated into the main distribution. There is even be the suggestion to use the core of Checkstyle to support other languages. This is entirely possible given the fact that a lot of the Checkstyle architecture is language independent.

But after reading this blog from Alan I was left thinking, but if only he knew how easy it was to write a Check for this kind of stuff. The irony is that I have had drinks with Alan, and I should add, it was a good night.

I am not sure what is the best way to go about communicating how Checkstyle has changed since the old 2.4 release. If you have a good idea, please let me know.

Read: Checkstyle, a victim of its early success

Topic: ctl+shift+v in IDEA Previous Topic    

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use