Last active
November 9, 2020 06:26
-
-
Save yangl/6f5d34e798e0791dddb49a6cc4484174 to your computer and use it in GitHub Desktop.
阿里巴巴Java代码规约扫描插件 p3c-pmd使用例子 https://github.com/alibaba/p3c/tree/master/p3c-pmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<!-- ... --> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-pmd-plugin</artifactId> | |
<version>3.8</version> | |
<configuration> | |
<rulesets> | |
<ruleset>/rulesets/java/ali-comment.xml</ruleset> | |
<ruleset>/rulesets/java/ali-concurrent.xml</ruleset> | |
<ruleset>/rulesets/java/ali-constant.xml</ruleset> | |
<ruleset>/rulesets/java/ali-exception.xml</ruleset> | |
<ruleset>/rulesets/java/ali-flowcontrol.xml</ruleset> | |
<ruleset>/rulesets/java/ali-naming.xml</ruleset> | |
<ruleset>/rulesets/java/ali-oop.xml</ruleset> | |
<ruleset>/rulesets/java/ali-orm.xml</ruleset> | |
<ruleset>/rulesets/java/ali-other.xml</ruleset> | |
<ruleset>/rulesets/java/ali-set.xml</ruleset> | |
<ruleset>/rulesets/vm/ali-other.xml</ruleset> | |
</rulesets> | |
<aggregate>true</aggregate> | |
<printFailingErrors>true</printFailingErrors> | |
</configuration> | |
<dependencies> | |
<dependency> | |
<groupId>com.alibaba.p3c</groupId> | |
<artifactId>p3c-pmd</artifactId> | |
<version>1.3.0</version> | |
</dependency> | |
</dependencies> | |
<executions> | |
<execution> | |
<phase>compile</phase> | |
<goals> | |
<goal>check</goal> | |
<goal>cpd</goal> | |
</goals> | |
</execution> | |
</executions> | |
</plugin> | |
<!-- ... --> | |
</plugins> | |
</build> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment