we have a project which is checked by PMD for violations of e.g. unused private methods. Our problem is that we don't know if it is possible to ignore private Methods which are annotated with @PostConstruct
.
The rule is defined as following:
<rule ref="rulesets/java/unusedcode.xml/UnusedPrivateMethod"/>
Edit:
My goal is to define it once to ignore annotated methods. I would like to prevent writing @SupressWarnings
on every method.