2

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.

asked Mar 4, 2013 at 14:43

1 Answer 1

2

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.

answered Mar 4, 2013 at 14:58
3
  • 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 Commented Mar 4, 2013 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? Commented Mar 4, 2013 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 Commented Mar 5, 2013 at 10:26

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.