A few sprints ago we enabled SonarQube and PMD analysis on the Maven and Gradle tasks. We are continuing to add code analysis tooling the main Java build tasks with Checkstyle support for Gradle.
Checkstyle Analysis with Gradle
Checkstyle is the analyzer of choice for enforcing a coding standard. It is a highly configurable analyzer, but if you want to get going fast and use the “Java Sun Checks” enable the “Run Checkstyle” box available in the Code Analysis section.
The build summary then reports the number of issues found by Checkstyle. Detailed issue logs are available under the build Artifact tab of the build summary.
Customizing Checkstyle
If you wish to configure the Checkstyle analysis have a look at the official documentation on applying the Checkstyle plugin in the Gradle build. We will detect that you apply the plugin and we will not intervene, but we will try to find the Checkstyle reports and produce a build summary.
Feedback
We’d like to hear from you. Please raise issues and suggestions on the issues tab of the VSTS task repository in GitHub: https://github.com/microsoft/vsts-tasks/issues and add the label “Area: Analysis”.