{"id":19325,"date":"2016-07-29T21:54:00","date_gmt":"2016-07-29T14:54:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/?p=19325"},"modified":"2019-02-14T17:33:47","modified_gmt":"2019-02-15T01:33:47","slug":"gradle-build-task-now-also-supports-pmd-analysis","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/gradle-build-task-now-also-supports-pmd-analysis\/","title":{"rendered":"Gradle build task now also supports PMD analysis"},"content":{"rendered":"<p>Last month, we enabled support for PMD analysis in the Maven build task (see <a href=\"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/2016\/06\/15\/the-maven-build-task-now-supports-pmd-analysis-out-of-the-box\/\">The Maven build task now supports PMD analysis out of the box<\/a>). This is now the turn of Gradle.<\/p>\n<p><b>PMD Analysis with Gradle<\/b><\/p>\n<p>You can now request a PMD analysis in the Gradle build task using the new \u201cRun PMD Analysis\u201d checkbox which instructs Gradle to perform <a href=\"https:\/\/pmd.github.io\/\">PMD static analysis<\/a><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image00251.png\"><img decoding=\"async\" width=\"760\" height=\"436\" title=\"clip_image002[5]\" style=\"padding-top: 0px;padding-left: 0px;padding-right: 0px;border: 0px\" alt=\"clip_image002[5]\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2016\/07\/clip_image0025_thumb.png\" border=\"0\" \/><\/a><\/p>\n<p>The build summary then reports the number of issues found by PMD. Detailed issue logs are available under the build artifact tab of the build summary like for Maven.<\/p>\n<p>The PMD analysis is performed using the default set of rules, which at the time of writing are the basic rules and the bracing rules. You are encouraged to specify other rules by modifying their gradle scripts.<\/p>\n<p>If you have already configured PMD, we won\u2019t touch your settings, but we will try to find the results and create a report.<\/p>\n<p><b>Feedback<\/b><\/p>\n<p>We\u2019d like to hear from you. Please raise issues and suggestions on the issues tab of the VSTS task repository in GitHub: <a href=\"https:\/\/github.com\/microsoft\/vsts-tasks\/issues\">https:\/\/github.com\/microsoft\/vsts-tasks\/issues<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last month, we enabled support for PMD analysis in the Maven build task (see The Maven build task now supports PMD analysis out of the box). This is now the turn of Gradle. PMD Analysis with Gradle You can now request a PMD analysis in the Gradle build task using the new \u201cRun PMD Analysis\u201d [&hellip;]<\/p>\n","protected":false},"author":112,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[253,1,249],"tags":[],"class_list":["post-19325","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-devops-server","category-devops","category-open-source"],"acf":[],"blog_post_summary":"<p>Last month, we enabled support for PMD analysis in the Maven build task (see The Maven build task now supports PMD analysis out of the box). This is now the turn of Gradle. PMD Analysis with Gradle You can now request a PMD analysis in the Gradle build task using the new \u201cRun PMD Analysis\u201d [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/19325","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/112"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=19325"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/19325\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=19325"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=19325"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=19325"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}