[英]PMD issue and Java --version
Yeah, I also faced these warnings.是的,我也遇到了这些警告。
I created a started project (java-17, maven, pmd, unit tests, log4j2).我创建了一个启动项目(java-17、maven、pmd、单元测试、log4j2)。 https://github.com/yan-khonski-it/java-17-pmd
https://github.com/yan-khonski-it/java-17-pmd
Instead of using a specific rule, I used category.我没有使用特定的规则,而是使用了类别。
<rulesets>
<ruleset>category/java/bestpractices.xml</ruleset>
<!-- My own file with custom rules, you can remove it-->
<ruleset>custom-ruleset.xml</ruleset>
</rulesets>
For example, in the plugin source code:例如插件源码中:
<!-- Rules, that have been moved into a category -->
and same applies to other categories / rule sets.这同样适用于其他类别/规则集。
https://github.com/pmd/pmd/blob/master/pmd-java/src/main/resources/rulesets/java/junit.xml https://github.com/pmd/pmd/blob/master/pmd-java/src/main/resources/rulesets/java/junit.xml
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.