Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Here's a common scenario for developers who want to integrate static analysis in their workflow. Any suggestions on how to get this working with a minimum of pain?

The situation is similar to the one discussed here: http://enterprise-it-solutions.blogspot.dk/2011/02/maven-configure-checkstyle-pmd-eclipse.html

The dev system uses a centralized build server based on Maven and Hudson. The developers use Eclipse and Java, and use a standard tool (git, svn or baazar) for source control

The developers need a local version of the static analysis tool to avoid having to deal with a dozen quality issues at once when they want to check in a change.

The build server (Maven + Hudson) has a Findbugs configuration that defines "Current standard for quality".

For each programmer, there should also be a standard configuration for Findbugs that is at least as restrictive as the server-side configuration, and perhaps even identical to it.

The programmer should be able to change his local configuration, because - let's face it - he's gonna do that anyway at least once, yet it should be relatively easy to reset to standard. Changes should only flow from the server to the developers, not the other direction.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

looks like you've reached a great stage in the evolution in your CI builds. What you're probably after next is Sonar.

Localised configurations can be shared out of say a GitHub repo which can contain IDE or Maven plugin shared config. However, these types of checks actually slow local developers down a great deal, it's generally a reasonable trade-off for Sonar to pickup on those things and report back to the developer.

share|improve this answer
    
Well, I've tried both with and without local checks of code quality, and personally I prefer the immediate feedback option of using a plugin. The psychology of motivation for code quality improvement is a complex one :D –  Anders Johansen Mar 4 '13 at 15:10
    
@AndersJohansen It appears that the ide plugin uses a different configuration file than the input for maven - How to configure findbugs plugin in eclipse? –  MichaelT Mar 4 '13 at 15:13
1  
Yes sadly the configurations are different, I've seen hardcore teams use XSLT transforms to have a master copy and create IDE/Maven/Jenkins/Sonar versions –  Martijn Verburg Mar 5 '13 at 10:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.