简体   繁体   English

PMD 问题和 Java --version

[英]PMD issue and Java --version

I would like to know if this message is correct, when I write in cmd我想知道这个消息是否正确,当我写在 cmd

java --version java——版本

I add it in the path我在路径中添加它

在此处输入图像描述

I have some troubles with Salesforce extension PMD and shows the following message:我在使用 Salesforce 分机PMD时遇到一些问题,并显示以下消息:

在此处输入图像描述

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM