Wow, I don’t know how did I miss this awesome tool. Just go to http://www.sonarsource.org/ download it and install it. It will help you keep your code much cleaner and with less bugs (I didn’t say bugless :))
Installation is easy, UI is simple enough, a lot of features (different metrics, time machine, unit tests etc)… And one of the great things I love about it there is a Sonar plugin for Hudson, and you can find it http://wiki.hudson-ci.org/display/HUDSON/Sonar+Plugin. With that plugin you could analyze your code with every night build, compare it to the previous, see if you have any improvements.
Oh yeah, one more thing, it’s maven ready. And if you are not using Java, there is a PHP, Flex, .NET, Groovy… plugins, check it out here http://docs.codehaus.org/display/SONAR/Sonar+Plugin+Library