- PDM provides now the reason of violation and also gives reason and URL...

... such as http://pmd.sourceforge.net/pmd-5.2.1/pmd-java/rules/java/unusedcode.html#UnusedLocalVariable

- checkstyle and findbugs do not offer such feature out of the box
You check property for every violation, it's better to check it first. Also, don't build StringBuilder up front, you may not need it if option is disabled. Also, please extract building additional details to a method.