Check out our end-to-end Java DevOps demo video on YouTube!

ON THIS PAGE we will highlight how you can perform PMD, CheckStyle, and FindBugs standalone static analysis during a Maven and/or Gradle build using Team Foundation Server 2017 or Visual Studio Team Services.
ASSUMPTIONS

  • You have a Team Foundation team project available. If you don't, we encourage you to go through our Getting Started walkthrough.
  • If you aren't doing the tutorial, you need to have an existing Maven and/or Gradle build task to use.

PMD, CheckStyle and FindBugs

PMD, CheckStyle, and FindBugs are popular Java static analyzers that can be used to identify areas of improvement in your code (be it style or potential bugs).

Enabling the analysis

To use your these tools you simply check the corresponding checkbox in the 'Static Analysis' section of the Maven or Gradle build task.

Seing issues in the build summary and get details from the Artifacts tab

The build summary reports the number of issues found by each of the tools you have activated.

Detailed issue logs are available under the build artifact tab of the build summary. If you analyze a multi-module Maven project, the results are split by module.

PDM, CheckStyle and FindBugs support for Maven and Gradle is currently available on Team Services or Team Foundation Server 2017 Update 1 or later.

Next Steps

For more detailed instructions on enabling static analysis tools, which default rules are activated and how to configure them, see the following blog posts: