diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index a2f534022..cad68b65e 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -48,7 +48,7 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@v2
+ uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: adopt
diff --git a/idea-plugin/README.md b/idea-plugin/README.md
index adbdaeb92..eadf0df9f 100644
--- a/idea-plugin/README.md
+++ b/idea-plugin/README.md
@@ -21,7 +21,7 @@ cd p3c-idea
## Use p3c-common as your plugin dependency
```groovy
-compile 'com.xenoamess.p3c.idea:p3c-common:2.1.1.2x'
+compile 'com.xenoamess.p3c.idea:p3c-common:2.1.1.3x'
```
## [中文使用手册](README_cn.md)
## Install
@@ -157,6 +157,9 @@ Firstly p3c_config.x8l be at "$your_project_path/p3c_config.x8l".
>
Console
+ >
+
+ com.xenoamess.cyan_potion.base.steam
>
EnumConstantsMustHaveCommentRule>
@@ -239,6 +242,16 @@ then means in this repo we will not detect anything for all classes whose name b
BE ATTENTION, according to PMD interface reason,
class names in class_blacklist must be SimpleName.
+### package_blacklist
+
+Node package_blacklist contains global settings for a repo,
+means ban packages in this repo globally.
+
+For example, if package_blacklist contains `com.xenoamess`,
+then means in this repo we will not detect anything for all classes whose package under `com.xenoamess`.
+
+BE ATTENTION, it will also ban packages under `com.xenoamess`, like `com.xenoamess.cyan_potion`
+
### rule_class_pair_blacklist
Node rule_class_pair_blacklist contains settings for class/rule pairs,
@@ -307,7 +320,10 @@ If you really hate x8l you can use json configuration files.
],
"class_blacklist": [
"Console"
- ],
+ ],
+ "package_blacklist": [
+ "com.xenoamess.cyan_potion.base.steam"
+ ],
"rule_class_pair_blacklist": {
"JamepadGamepadKeyEnum": [
"EnumConstantsMustHaveCommentRule"
diff --git a/idea-plugin/README_cn.md b/idea-plugin/README_cn.md
index 423927344..6700506cc 100644
--- a/idea-plugin/README_cn.md
+++ b/idea-plugin/README_cn.md
@@ -193,6 +193,9 @@ Alt+Enter键可呼出Intention菜单,不同的规则会提示不同信息的Qu
>
Console
+ >
+
+ com.xenoamess.cyan_potion.base.steam
>
EnumConstantsMustHaveCommentRule>
@@ -267,6 +270,14 @@ class_blacklist节点主要包括对该项目中的某一类禁用所有规则
注意,由于PMD技术原因,class_blacklist中的类必须为SimpleName
+### package_blacklist
+
+package_blacklist节点主要包括对该项目中的某一个父包禁用所有规则。
+
+如,package_blacklist中含有`com.xenoamess`包,则该项目中所有`com.xenoamess`包下的类均不会进行任何检测。
+
+注意,形如`com.xenoamess.cyan_potion`的,`com.xenoamess`包的子包也会被禁用所有规则。
+
### rule_class_pair_blacklist
rule_class_pair_blacklist节点主要包括对该项目中的某一类禁用某数个规则。
@@ -332,7 +343,10 @@ Rule类名既可以是SimpleName,也可以是CanonicalName。
],
"class_blacklist": [
"Console"
- ],
+ ],
+ "package_blacklist": [
+ "com.xenoamess.cyan_potion.base.steam"
+ ],
"rule_class_pair_blacklist": {
"JamepadGamepadKeyEnum": [
"EnumConstantsMustHaveCommentRule"
diff --git a/idea-plugin/gradle.properties b/idea-plugin/gradle.properties
index 3d3bec32c..f154a19da 100644
--- a/idea-plugin/gradle.properties
+++ b/idea-plugin/gradle.properties
@@ -8,4 +8,4 @@ idea_version=201.7223.91
#idea_version=145.258.11
plugin_name=Alibaba Java Coding Guidelines
systemProp.file.encoding=UTF-8
-plugin_version=2.1.1.2x
+plugin_version=2.1.1.3x
diff --git a/idea-plugin/p3c-idea/src/main/resources/META-INF/plugin.xml b/idea-plugin/p3c-idea/src/main/resources/META-INF/plugin.xml
index 0ebd3b312..06abc9e79 100644
--- a/idea-plugin/p3c-idea/src/main/resources/META-INF/plugin.xml
+++ b/idea-plugin/p3c-idea/src/main/resources/META-INF/plugin.xml
@@ -29,6 +29,11 @@
]]>
2.1.1.3x
+ pmd upgrade to 6.44.0
+ fix bugs of SneakyThrowsWithoutExceptionTypeRule
+ add com.alibaba.p3c.pmd.config>package_blacklist config. see https://github.com/XenoAmess/p3c/issues/211
+
2.1.1.2x
- pmd upgrade to 6.41.0
- now allow use json for configuration too (p3c_config.json). see https://github.com/XenoAmess/p3c/issues/144
diff --git a/p3c-pmd/README.md b/p3c-pmd/README.md
index 90666b80b..047e2c96b 100644
--- a/p3c-pmd/README.md
+++ b/p3c-pmd/README.md
@@ -11,7 +11,7 @@
com.xenoamess.p3c
p3c-pmd
- 2.1.1.2x
+ 2.1.1.3x
```
### Gradle
diff --git a/p3c-pmd/pom.xml b/p3c-pmd/pom.xml
index 70e519cab..19438be5e 100644
--- a/p3c-pmd/pom.xml
+++ b/p3c-pmd/pom.xml
@@ -6,7 +6,7 @@
4.0.0
com.xenoamess.p3c
p3c-pmd
- 2.1.1.2x
+ 2.1.1.3x
jar
p3c-pmd
@@ -23,7 +23,6 @@
6.44.0
- 1.8
1.3.2
1.6.20
2.3.9
@@ -48,7 +47,7 @@
3.0.0-M2
3.0.0-M6
1.21
- 0.8.7
+ 0.8.8
2.17.2
1.7.36
diff --git a/p3c-pmd/src/main/java/com/xenoamess/p3c/pmd/config/P3cConfigDataBean.java b/p3c-pmd/src/main/java/com/xenoamess/p3c/pmd/config/P3cConfigDataBean.java
index 785d8146b..8971f536d 100644
--- a/p3c-pmd/src/main/java/com/xenoamess/p3c/pmd/config/P3cConfigDataBean.java
+++ b/p3c-pmd/src/main/java/com/xenoamess/p3c/pmd/config/P3cConfigDataBean.java
@@ -83,6 +83,15 @@ HashMap> getRuleClassPairBlackListMap(@NotNull List