<p>How are folks integrating various static analysis tools such as PMD, Checkstyle, and FindBugs so that they are used together in some uniform way? In particular, I'm interested in generating a single uniform report that includes warnings from all tools. Also, I want to be able to mark-up my code with reasonably consistent looking warning suppressions.</p>

<p>My question here is not meant to address tool "overlap" where, say, PMD and Checkstyle are looking for the same things. That is another issue.</p>

<p>Please see some of my <a href="https://stackoverflow.com/questions/4080/what-code-analysis-tools-do-you-use-for-your-java-projects#79845"> thoughts on the matter in an answer</a> to <a href="https://stackoverflow.com/questions/4080/what-code-analysis-tools-do-you-use-for-your-java-projects">a related question</a>.</p>

[{'answer_id': 79948, 'author': 'user11087', 'author_id': 11087, 'author_profile': 'https://Stackoverflow.com/users/11087', 'pm_score': 1, 'selected': False, 'text': '<p>I am not clear on what qualifies as a single uniform report in your book but here is what I do.</p>\n\n<p>I use Maven2 for builds and with it you can configure a series of reporting plugins (including PMD, CPD, checkstyle, coberturba, etc).  Maven will also auto-generate a website (site plugin) for your project which contains all the reports in a nice easy-to-navigate webpage format.</p>\n'}, {'answer_id': 79952, 'author': 'Dónal', 'author_id': 2648, 'author_profile': 'https://Stackoverflow.com/users/2648', 'pm_score': 0, 'selected': False, 'text': '<p>If you build your project with Maven, and you have those tools "plugged in" to your Maven build, then the Maven report that is generated for the build will include the output of those static analysis tools.</p>\n'}, {'answer_id': 84051, 'author': 'Greg Mattes', 'author_id': 13940, 'author_profile': 'https://Stackoverflow.com/users/13940', 'pm_score': 0, 'selected': False, 'text': '<p>Thanks for the responses!</p>\n\n<p>The goal here is to configure these tools so that they behave in some similar manner with respect to each other. This goes beyond simply dumping whatever report they generate automatically, or using whatever warning suppression hint they use out-of-the-box.</p>\n\n<p>For example, I have PMD, Checkstyle, and FindBugs configured to report all warnings in the following format:</p>\n\n<pre><code>/absolute-path/filename:line-number:column-number: warning(tool-name): message</code></pre>\n\n<p><p>So a warning might look like this:</p>\n\n<pre><code>/project/src/com/example/Foo.java:425:9: warning(Checkstyle): Missing a Javadoc comment.</code></pre>\n\n<p><p>Also, all warning suppressions in my source code are marked with a symbol that includes the string "<code>SuppressWarnings</code>" regardless of the static analysis tool being surpressed. Sometimes this symbol is an annotation, sometimes it\'s in a comment, but it always has that name.</p>\n\n<p><p>I explain these ideas in a bit more detail <a href="https://stackoverflow.com/questions/4080/what-code-analysis-tools-do-you-use-for-your-java-projects#79845">here</a>.</p>\n'}, {'answer_id': 203360, 'author': 'Alex Varju', 'author_id': 18208, 'author_profile': 'https://Stackoverflow.com/users/18208', 'pm_score': 2, 'selected': False, 'text': '<p>I stumbled across <a href="http://www.jcoderz.org/fawkez/wiki/JcReport" rel="nofollow noreferrer">JcReport</a> today, which I think does exactly what you are looking for.  At least, it handles the reports in a combined way; suppressions are still tool-specific.  This tool claims to support automatically integrating the output of PMD, CPD, FindBugs, CheckStyle, and Cobertura into a single HTML report.</p>\n\n<p>I haven\'t tried it yet, but definitely intend to soon.</p>\n'}, {'answer_id': 208080, 'author': 'Dave', 'author_id': 28068, 'author_profile': 'https://Stackoverflow.com/users/28068', 'pm_score': 2, 'selected': False, 'text': '<p>Another option is glean. <a href="http://jbrugge.com/glean/" rel="nofollow noreferrer">http://jbrugge.com/glean/</a></p>\n\n<p>From their website: Glean is a framework of Ant scripts for generating feedback on a team\'s source code. Glean\'s goal is to make it possible to add feedback to your build cycle with as little pain as possible. The scripts drive a number of open-source tools and collect the resulting HTML for you to deploy to a project website or some other common team area. Add it at the end of a daily build cycle and it is a quick way to keep a number of feedback sources up to date and in one place. </p>\n'}]
['https://Stackoverflow.com/questions/79918', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/13940/']