This is an automated email from the ASF dual-hosted git repository.

zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new ba3372f782b Add RAT plugin to enable local check (#22084)
ba3372f782b is described below

commit ba3372f782b034987b4b7030b40ca8065970f99d
Author: 孙念君 Nianjun Sun <[email protected]>
AuthorDate: Fri Nov 11 19:01:54 2022 +0800

    Add RAT plugin to enable local check (#22084)
---
 .github/PULL_REQUEST_TEMPLATE                      |  2 +-
 .github/workflows/ci.yml                           |  2 +-
 .github/workflows/it-scaling.yml                   |  2 +-
 .github/workflows/it-showprocesslist.yml           |  2 +-
 .github/workflows/it-transaction.yml               |  2 +-
 .github/workflows/it.yml                           |  2 +-
 .github/workflows/nightly-ci.yml                   |  2 +-
 .github/workflows/nightly-it-example-generator.yml |  2 +-
 .github/workflows/nightly-sql-parser.yml           |  2 +-
 pom.xml                                            | 63 ++++++++++++++++++++++
 10 files changed, 72 insertions(+), 9 deletions(-)

diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE
index 2e7e6bd16bc..bd20c10c0a9 100644
--- a/.github/PULL_REQUEST_TEMPLATE
+++ b/.github/PULL_REQUEST_TEMPLATE
@@ -11,6 +11,6 @@ Before committing this PR, I'm sure that I have checked the 
following options:
 - [ ] My code follows the [code of 
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) 
of this project.
 - [ ] I have self-reviewed the commit code.
 - [ ] I have (or in comment I request) added corresponding labels for the pull 
request.
-- [ ] I have passed maven check locally : `mvn clean install -B -T2C 
-DskipTests -Dmaven.javadoc.skip=true -e`.
+- [ ] I have passed maven check locally : `./mvnw clean install -B -T1C 
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
 - [ ] I have made corresponding changes to the documentation.
 - [ ] I have added corresponding unit tests for my changes.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3ce42668b85..e8de04d7e5e 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -48,7 +48,7 @@ concurrency:
   cancel-in-progress: true
 
 env:
-  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dcheckstyle.skip=true 
-Dspotless.apply.skip=true -Dmaven.javadoc.skip=true -Djacoco.skip=true
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dcheckstyle.skip=true 
-Dspotless.apply.skip=true -Dmaven.javadoc.skip=true -Djacoco.skip=true 
-Drat.skip=true
 
 jobs:
   ci:
diff --git a/.github/workflows/it-scaling.yml b/.github/workflows/it-scaling.yml
index abd66306610..ce9eb759104 100644
--- a/.github/workflows/it-scaling.yml
+++ b/.github/workflows/it-scaling.yml
@@ -66,7 +66,7 @@ concurrency:
   cancel-in-progress: true
 
 env:
-  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true 
-Dcheckstyle.skip=true -Dspotless.apply.skip=true -Djacoco.skip=true 
-Dfailsafe.skipAfterFailureCount=1 -Dio.netty.leakDetectionLevel=advanced
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true 
-Dcheckstyle.skip=true -Dspotless.apply.skip=true -Djacoco.skip=true 
-Drat.skip=true -Dfailsafe.skipAfterFailureCount=1 
-Dio.netty.leakDetectionLevel=advanced
 
 jobs:
   scaling-it-test:
diff --git a/.github/workflows/it-showprocesslist.yml 
b/.github/workflows/it-showprocesslist.yml
index 60986eb8918..cd8f96ffc16 100644
--- a/.github/workflows/it-showprocesslist.yml
+++ b/.github/workflows/it-showprocesslist.yml
@@ -52,7 +52,7 @@ concurrency:
   cancel-in-progress: true
 
 env:
-  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true 
-Dcheckstyle.skip=true -Dspotless.apply.skip=true -Djacoco.skip=true 
-Dfailsafe.skipAfterFailureCount=1 -Dio.netty.leakDetectionLevel=advanced
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true 
-Dcheckstyle.skip=true -Dspotless.apply.skip=true -Djacoco.skip=true 
-Drat.skip=true -Dfailsafe.skipAfterFailureCount=1 
-Dio.netty.leakDetectionLevel=advanced
 
 jobs:
   showprocesslist-it-test:
diff --git a/.github/workflows/it-transaction.yml 
b/.github/workflows/it-transaction.yml
index 2338ad49f38..97b362b5384 100644
--- a/.github/workflows/it-transaction.yml
+++ b/.github/workflows/it-transaction.yml
@@ -56,7 +56,7 @@ concurrency:
   cancel-in-progress: true
 
 env:
-  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true 
-Dcheckstyle.skip=true -Dspotless.apply.skip=true -Djacoco.skip=true 
-Dfailsafe.skipAfterFailureCount=1 -Dio.netty.leakDetectionLevel=advanced
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true 
-Dcheckstyle.skip=true -Dspotless.apply.skip=true -Djacoco.skip=true 
-Drat.skip=true -Dfailsafe.skipAfterFailureCount=1 
-Dio.netty.leakDetectionLevel=advanced
 
 jobs:
   transaction-it-test:
diff --git a/.github/workflows/it.yml b/.github/workflows/it.yml
index ecf112d13bb..7da5a1cce1b 100644
--- a/.github/workflows/it.yml
+++ b/.github/workflows/it.yml
@@ -60,7 +60,7 @@ concurrency:
   cancel-in-progress: true
 
 env:
-  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true 
-Dcheckstyle.skip=true -Djacoco.skip=true -Dspotless.apply.skip=true
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dmaven.javadoc.skip=true 
-Dcheckstyle.skip=true -Djacoco.skip=true -Dspotless.apply.skip=true 
-Drat.skip=true
 
 jobs:
   build-it-image:
diff --git a/.github/workflows/nightly-ci.yml b/.github/workflows/nightly-ci.yml
index 393bc9420ce..d87ba129906 100644
--- a/.github/workflows/nightly-ci.yml
+++ b/.github/workflows/nightly-ci.yml
@@ -22,7 +22,7 @@ on:
     - cron: '0 18 */1 * *'  # once a day. UTC time
 
 env:
-  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dcheckstyle.skip=true
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dcheckstyle.skip=true -Drat.skip=true
 
 jobs:
   ci:
diff --git a/.github/workflows/nightly-it-example-generator.yml 
b/.github/workflows/nightly-it-example-generator.yml
index 564899fadfc..32aaa77a6a5 100644
--- a/.github/workflows/nightly-it-example-generator.yml
+++ b/.github/workflows/nightly-it-example-generator.yml
@@ -22,7 +22,7 @@ on:
     - cron: '0 19 */1 * *'  # once a day. UTC time
     
 env:
-  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dcheckstyle.skip=true 
-Dspotless.apply.skip=true -Dmaven.javadoc.skip=true
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dcheckstyle.skip=true 
-Dspotless.apply.skip=true -Dmaven.javadoc.skip=true -Drat.skip=true
 
 jobs:
   example-generator:
diff --git a/.github/workflows/nightly-sql-parser.yml 
b/.github/workflows/nightly-sql-parser.yml
index 4c462354677..d8f0491bf7f 100644
--- a/.github/workflows/nightly-sql-parser.yml
+++ b/.github/workflows/nightly-sql-parser.yml
@@ -23,7 +23,7 @@ on:
   workflow_dispatch:
 
 env:
-  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dcheckstyle.skip=true 
-Dspotless.apply.skip=true -Dmaven.javadoc.skip=true -Djacoco.skip=true
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 -Dcheckstyle.skip=true 
-Dspotless.apply.skip=true -Dmaven.javadoc.skip=true -Djacoco.skip=true 
-Drat.skip=true
 
 jobs:
   sql-parse:
diff --git a/pom.xml b/pom.xml
index 9262a15f968..55fa2c0e226 100644
--- a/pom.xml
+++ b/pom.xml
@@ -120,6 +120,7 @@
         <mockito.version>4.8.0</mockito.version>
         
         <!-- Plugin versions -->
+        <apache-rat-plugin.version>0.15</apache-rat-plugin.version>
         <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
         <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
         <maven-javadoc-plugin.version>3.3.0</maven-javadoc-plugin.version>
@@ -984,6 +985,68 @@
             </plugins>
         </pluginManagement>
         <plugins>
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <version>${apache-rat-plugin.version}</version>
+                <configuration>
+                    <excludes>
+                        <exclude>**/gen/**</exclude>
+                        <exclude>**/target/**</exclude>
+                        <exclude>**/logs/**</exclude>
+                        <exclude>**/*.log</exclude>
+                        <exclude>**/*.tokens</exclude>
+                        <!-- IDE files -->
+                        <exclude>**/*.iml</exclude>
+                        <exclude>**/.idea/**</exclude>
+                        <exclude>**/*.classpath</exclude>
+                        <exclude>**/.project</exclude>
+                        <exclude>**/.settings/**</exclude>
+                        <exclude>**/dependency-reduced-pom.xml</exclude>
+                        <!-- git files -->
+                        <exclude>**/.gitignore</exclude>
+                        <exclude>**/.gitmodules</exclude>
+                        <exclude>**/.git/**</exclude>
+                        <!-- CI files -->
+                        <exclude>**/.travis.yml</exclude>
+                        <exclude>**/.codecov.yml</exclude>
+                        <exclude>**/.mvn/jvm.config</exclude>
+                        
<exclude>**/.mvn/wrapper/maven-wrapper.properties</exclude>
+                        <!-- GitHub files -->
+                        <exclude>**/.github/**</exclude>
+                        <!-- document files -->
+                        <exclude>**/*.md</exclude>
+                        <excldue>**/*.MD</excldue>
+                        <exclude>**/*.txt</exclude>
+                        <exclude>**/docs/**</exclude>
+                        <!-- UI files -->
+                        <exclude>**/.babelrc</exclude>
+                        <exclude>**/.editorconfig</exclude>
+                        <exclude>**/.eslintignore</exclude>
+                        <exclude>**/package.json</exclude>
+                        <exclude>**/assets/**</exclude>
+                        <exclude>**/dist/**</exclude>
+                        <exclude>**/etc/**</exclude>
+                        <exclude>**/node/**</exclude>
+                        <exclude>**/node_modules/**</exclude>
+                        <exclude>**/test/coverage/**</exclude>
+                        <exclude>**/package-lock.json</exclude>
+                        <!-- example files -->
+                        <exclude>/examples/**</exclude>
+                        <!-- Helm files -->
+                        <exclude>**/.helmignore</exclude>
+                        <exclude>**/_helpers.tpl</exclude>
+                    </excludes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                        <phase>verify</phase>
+                    </execution>
+                </executions>
+            </plugin>
             <plugin>
                 <artifactId>maven-source-plugin</artifactId>
                 <executions>

Reply via email to