{"id":798,"date":"2021-09-04T23:24:51","date_gmt":"2021-09-04T23:24:51","guid":{"rendered":"https:\/\/choudhury.com\/blog\/?p=798"},"modified":"2021-09-04T23:24:54","modified_gmt":"2021-09-04T23:24:54","slug":"static-analysis-using-pmd","status":"publish","type":"post","link":"https:\/\/choudhury.com\/blog\/2021\/09\/04\/static-analysis-using-pmd\/","title":{"rendered":"Static Analysis using PMD"},"content":{"rendered":"\n<p><a href=\"https:\/\/github.com\/pmd\" data-type=\"URL\" data-id=\"https:\/\/github.com\/pmd\">PMD <\/a>is a popular static analysis tool for Java.  Here is a simple <a href=\"https:\/\/github.com\/muminc\/enforce-pmd-example\" data-type=\"URL\" data-id=\"https:\/\/github.com\/muminc\/enforce-pmd-example\">example <\/a>showing to use PMD and get it to fail your build for any detected issues.<\/p>\n\n\n\n<p>How PMD failure is reported.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2021\/09\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"340\" src=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2021\/09\/image-1024x340.png\" alt=\"\" class=\"wp-image-801\" srcset=\"https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2021\/09\/image-1024x340.png 1024w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2021\/09\/image-300x99.png 300w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2021\/09\/image-768x255.png 768w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2021\/09\/image-1536x509.png 1536w, https:\/\/choudhury.com\/blog\/wp-content\/uploads\/2021\/09\/image-2048x679.png 2048w\" sizes=\"auto, (max-width: 706px) 89vw, (max-width: 767px) 82vw, 740px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>PMD is a popular static analysis tool for Java. Here is a simple example showing to use PMD and get it to fail your build for any detected issues. How PMD failure is reported.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[6,3,9],"tags":[],"class_list":["post-798","post","type-post","status-publish","format-standard","hentry","category-code-quality","category-java","category-maven"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/comments?post=798"}],"version-history":[{"count":5,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/798\/revisions"}],"predecessor-version":[{"id":804,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/posts\/798\/revisions\/804"}],"wp:attachment":[{"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/media?parent=798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/categories?post=798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/choudhury.com\/blog\/wp-json\/wp\/v2\/tags?post=798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}