You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by he...@apache.org on 2023/07/06 07:10:41 UTC

[shenyu] branch master updated: add checkstyle plugin into e2e module. (#4811)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 92966fd1d add checkstyle plugin into e2e module. (#4811)
92966fd1d is described below

commit 92966fd1d44279401a106d18f871fb506774c929
Author: DamonXue <Da...@gmail.com>
AuthorDate: Thu Jul 6 15:10:36 2023 +0800

    add checkstyle plugin into e2e module. (#4811)
    
    * add checkstyle plugin into e2e module.
    
    * no need to delete.
---
 .../admin/discovery/DefaultDiscoveryProcessor.java |  3 +--
 shenyu-e2e/pom.xml                                 | 22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/shenyu-admin/src/main/java/org/apache/shenyu/admin/discovery/DefaultDiscoveryProcessor.java b/shenyu-admin/src/main/java/org/apache/shenyu/admin/discovery/DefaultDiscoveryProcessor.java
index 43dcdb54f..12a4d97f0 100644
--- a/shenyu-admin/src/main/java/org/apache/shenyu/admin/discovery/DefaultDiscoveryProcessor.java
+++ b/shenyu-admin/src/main/java/org/apache/shenyu/admin/discovery/DefaultDiscoveryProcessor.java
@@ -221,8 +221,7 @@ public class DefaultDiscoveryProcessor implements DiscoveryProcessor, Applicatio
     private String buildProxySelectorKey(final String listenerNode) {
         return StringUtils.isNotBlank(listenerNode) ? listenerNode : DEFAULT_LISTENER_NODE;
     }
-
-
+    
     /**
      * getDiscoveryDataChangedEventListener.
      *
diff --git a/shenyu-e2e/pom.xml b/shenyu-e2e/pom.xml
index 330280b39..d4c803630 100644
--- a/shenyu-e2e/pom.xml
+++ b/shenyu-e2e/pom.xml
@@ -56,6 +56,7 @@
         <apache-rat-plugin.version>0.13</apache-rat-plugin.version>
         <spring-boot.version>2.7.13</spring-boot.version>
         <spring-framework.version>5.3.28</spring-framework.version>
+        <maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
     </properties>
 
     <modules>
@@ -275,6 +276,27 @@
                 </configuration>
             </plugin>
 
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <version>${maven-checkstyle-plugin.version}</version>
+                <configuration>
+                    <configLocation>/../script/shenyu_checkstyle.xml</configLocation>
+                    <headerLocation>/../script/checkstyle-header.txt</headerLocation>
+                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
+                    <excludes>**/transfer/**/*</excludes>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>validate</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
             <plugin>
                 <groupId>org.apache.rat</groupId>
                 <artifactId>apache-rat-plugin</artifactId>