From 1f04187f2707c461aa7c79dbf047284f6c3bcf9e Mon Sep 17 00:00:00 2001 From: yuanbingze Date: Thu, 7 Apr 2022 11:19:12 +0800 Subject: [PATCH 1/6] add checkstyle plugin --- pom.xml | 37 ++++ style/checkstyle.xml | 279 +++++++++++++++++++++++++++++ style/intellij-java-code-style.xml | 99 ++++++++++ 3 files changed, 415 insertions(+) create mode 100644 style/checkstyle.xml create mode 100644 style/intellij-java-code-style.xml diff --git a/pom.xml b/pom.xml index b1912227ef..7a25667311 100644 --- a/pom.xml +++ b/pom.xml @@ -106,6 +106,7 @@ 3.1.0 3.21.0-GA bash + 3.1.2 hugegraph-core @@ -344,6 +345,42 @@ + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${checkstyle.version} + + + com.puppycrawl.tools + checkstyle + 8.45 + + + + true + UTF-8 + style/checkstyle.xml + true + warning + true + + ${project.build.sourceDirectory} + + **\/generated-sources\/ + + + + compile + + check + + + + + + diff --git a/style/checkstyle.xml b/style/checkstyle.xml new file mode 100644 index 0000000000..16b86d3966 --- /dev/null +++ b/style/checkstyle.xml @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/style/intellij-java-code-style.xml b/style/intellij-java-code-style.xml new file mode 100644 index 0000000000..98d25db6f7 --- /dev/null +++ b/style/intellij-java-code-style.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + \ No newline at end of file From d06d7e6502564c6e925e05226ff494790b360818 Mon Sep 17 00:00:00 2001 From: yuanbingze Date: Thu, 7 Apr 2022 11:54:49 +0800 Subject: [PATCH 2/6] trigger CLA check From 1d603b3d6fb4ada785170524c027974c7cd6236e Mon Sep 17 00:00:00 2001 From: yuanbingze Date: Thu, 7 Apr 2022 14:06:00 +0800 Subject: [PATCH 3/6] merge checkstyle and intellij-java-code-style --- pom.xml | 26 +-- style/checkstyle.xml | 322 ++++++----------------------- style/intellij-java-code-style.xml | 124 ++++------- 3 files changed, 118 insertions(+), 354 deletions(-) diff --git a/pom.xml b/pom.xml index 7a25667311..9d83438c4e 100644 --- a/pom.xml +++ b/pom.xml @@ -106,7 +106,7 @@ 3.1.0 3.21.0-GA bash - 3.1.2 + 3.1.0 hugegraph-core @@ -351,28 +351,18 @@ org.apache.maven.plugins maven-checkstyle-plugin ${checkstyle.version} - - - com.puppycrawl.tools - checkstyle - 8.45 - - - true - UTF-8 style/checkstyle.xml - true - warning - true - - ${project.build.sourceDirectory} - - **\/generated-sources\/ + UTF-8 + true + true + false + false - compile + validate + validate check diff --git a/style/checkstyle.xml b/style/checkstyle.xml index 16b86d3966..9373a70d91 100644 --- a/style/checkstyle.xml +++ b/style/checkstyle.xml @@ -1,279 +1,89 @@ - - - + - + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> + + + + + + - - - - - + - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - + - - - + + + - - - - - + + + - - - + + + - - - - + + + + + - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/style/intellij-java-code-style.xml b/style/intellij-java-code-style.xml index 98d25db6f7..4bb2ef4ca4 100644 --- a/style/intellij-java-code-style.xml +++ b/style/intellij-java-code-style.xml @@ -1,77 +1,13 @@ - - - - - - - + + \ No newline at end of file + From f096b98a85ebcf64cc83fac3505e04e69ea9a0b2 Mon Sep 17 00:00:00 2001 From: yuanbingze Date: Thu, 14 Apr 2022 20:54:51 +0800 Subject: [PATCH 4/6] update checkstyle.xml --- pom.xml | 2 +- style/checkstyle.xml | 281 +++++++++++++++++++++++------ style/intellij-java-code-style.xml | 63 ------- 3 files changed, 227 insertions(+), 119 deletions(-) delete mode 100644 style/intellij-java-code-style.xml diff --git a/pom.xml b/pom.xml index 9d83438c4e..b66f7988e3 100644 --- a/pom.xml +++ b/pom.xml @@ -106,7 +106,7 @@ 3.1.0 3.21.0-GA bash - 3.1.0 + 3.1.2 hugegraph-core diff --git a/style/checkstyle.xml b/style/checkstyle.xml index 9373a70d91..9ae6f59472 100644 --- a/style/checkstyle.xml +++ b/style/checkstyle.xml @@ -2,88 +2,259 @@ - - - - - - - + + + - + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + - + - + + + - + + + + + + + + + + + + + + + + + + + + - + - + + - - - + + + - - - + + + + + + + + + + + + + - - - + + + + + + + + - + - + + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + diff --git a/style/intellij-java-code-style.xml b/style/intellij-java-code-style.xml deleted file mode 100644 index 4bb2ef4ca4..0000000000 --- a/style/intellij-java-code-style.xml +++ /dev/null @@ -1,63 +0,0 @@ - - From 8d57a41ab6061e980de784a6b13d3f49a40fbb0f Mon Sep 17 00:00:00 2001 From: yuanbingze Date: Thu, 14 Apr 2022 21:22:01 +0800 Subject: [PATCH 5/6] delete unnecessary blank lines --- style/checkstyle.xml | 47 ++------------------------------------------ 1 file changed, 2 insertions(+), 45 deletions(-) diff --git a/style/checkstyle.xml b/style/checkstyle.xml index 9ae6f59472..0361082808 100644 --- a/style/checkstyle.xml +++ b/style/checkstyle.xml @@ -10,24 +10,20 @@ - - - - @@ -38,7 +34,6 @@ - @@ -47,55 +42,44 @@ - - - - - - + - - - - - - - - - - @@ -124,7 +105,6 @@ - @@ -133,7 +113,6 @@ - @@ -159,20 +138,16 @@ ^sun\.misc\.BASE64Decoder, ^jdk\.internal\.jline\.internal\.Nullable"/> - - - - - - - - - - - @@ -211,47 +179,36 @@ - - - - - - - - - - - From c5d0075936d645852fb9165e073e6dd96d34c6a4 Mon Sep 17 00:00:00 2001 From: yuanbingze Date: Fri, 15 Apr 2022 11:25:46 +0800 Subject: [PATCH 6/6] commented checkstyle ImportOrder module --- style/checkstyle.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/style/checkstyle.xml b/style/checkstyle.xml index 0361082808..999f5c687a 100644 --- a/style/checkstyle.xml +++ b/style/checkstyle.xml @@ -24,16 +24,16 @@ - - - - - - - - - + + + + + + + + + +