From 7f300a35499558bf49b7ded511e29cb10ecd56cf Mon Sep 17 00:00:00 2001 From: Korbik Date: Wed, 12 Feb 2025 20:40:49 +0100 Subject: [PATCH 1/7] MVN: Spotless google-java-format --- pom.xml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0486a826..7dbca543 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,7 @@ 1.6.7 3.0.0 3.10.0 + 2.44.2 3.25.5 @@ -229,8 +230,26 @@ - - + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + + google-java-format + + + + + + + check + + + + From 2e3316084261ac8a0d80e3435b0903c89b0cbd01 Mon Sep 17 00:00:00 2001 From: Korbik Date: Tue, 18 Feb 2025 09:48:45 +0100 Subject: [PATCH 2/7] Add Checkstyle --- checkstyle.xml | 364 +++++++++++++++++++++++++++++++++++++++++++++++++ pom.xml | 20 +++ 2 files changed, 384 insertions(+) create mode 100644 checkstyle.xml diff --git a/checkstyle.xml b/checkstyle.xml new file mode 100644 index 00000000..515a844a --- /dev/null +++ b/checkstyle.xml @@ -0,0 +1,364 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index 7dbca543..de59c6a1 100644 --- a/pom.xml +++ b/pom.xml @@ -24,6 +24,7 @@ 3.0.0 3.10.0 2.44.2 + 3.6.0 3.25.5 @@ -40,6 +41,8 @@ 2.30.2 1.20.4 1.20.4 + + checkstyle.xml @@ -253,6 +256,23 @@ + + + + org.apache.maven.plugins + maven-checkstyle-plugin + ${maven-checkstyle-plugin.version} + + + + checkstyle + + + + + + + com.google.protobuf From f41ddf3f210da0a3eec97d1abb3e4cb044686975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Corbi=C3=A8re?= Date: Tue, 4 Mar 2025 06:35:53 +0100 Subject: [PATCH 3/7] Checkstyle: Upgrade 10.21.3 --- checkstyle.xml | 204 +++++++++++++++++++++++++++++++++---------------- pom.xml | 13 ++++ 2 files changed, 153 insertions(+), 64 deletions(-) diff --git a/checkstyle.xml b/checkstyle.xml index 515a844a..995c0f35 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -1,7 +1,7 @@ + "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> - + + - + - + - + + + + + default="checkstyle-suppressions.xml" /> + + + + + + + - + @@ -43,7 +55,8 @@ - + @@ -51,9 +64,9 @@ + value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/> + value="Consider using special escape sequence instead of octal value or Unicode escaped value."/> @@ -65,47 +78,56 @@ - - - - + value="LITERAL_DO, LITERAL_ELSE, LITERAL_FOR, LITERAL_IF, LITERAL_WHILE"/> + + + + + + + + + + + + COMPACT_CTOR_DEF, LITERAL_SWITCH, LITERAL_CASE, LITERAL_FINALLY"/> - + + value="COMMA, SEMI, TYPECAST, LITERAL_IF, LITERAL_ELSE, LITERAL_RETURN, + LITERAL_WHILE, LITERAL_DO, LITERAL_FOR, LITERAL_FINALLY, DO_WHILE, ELLIPSIS, + LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_CATCH, LAMBDA, + LITERAL_YIELD, LITERAL_CASE, LITERAL_WHEN"/> @@ -113,19 +135,35 @@ + + SR_ASSIGN, STAR, STAR_ASSIGN, LITERAL_ASSERT, + TYPE_EXTENSION_AND, LITERAL_WHEN"/> + value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks + may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/> + value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/> + + + + + + + + @@ -136,7 +174,7 @@ @@ -171,48 +209,48 @@ + value="Package name ''{0}'' must match pattern ''{1}''."/> + value="Type name ''{0}'' must match pattern ''{1}''."/> + value="Member name ''{0}'' must match pattern ''{1}''."/> + value="Parameter name ''{0}'' must match pattern ''{1}''."/> + value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/> + value="Catch parameter name ''{0}'' must match pattern ''{1}''."/> + value="Local variable name ''{0}'' must match pattern ''{1}''."/> + value="Pattern variable name ''{0}'' must match pattern ''{1}''."/> + value="Class type name ''{0}'' must match pattern ''{1}''."/> @@ -227,23 +265,23 @@ + value="Method type name ''{0}'' must match pattern ''{1}''."/> + value="Interface type name ''{0}'' must match pattern ''{1}''."/> + value="GenericWhitespace ''{0}'' is followed by whitespace."/> + value="GenericWhitespace ''{0}'' is preceded with whitespace."/> + value="GenericWhitespace ''{0}'' should followed by whitespace."/> + value="GenericWhitespace ''{0}'' is not preceded with whitespace."/> @@ -253,16 +291,24 @@ + + + + + + @@ -272,34 +318,34 @@ + value="CTOR_DEF, LITERAL_NEW, METHOD_CALL, METHOD_DEF, CTOR_CALL, + SUPER_CTOR_CALL, ENUM_CONSTANT_DEF, RECORD_DEF, RECORD_PATTERN_DEF"/> + RECORD_DEF, RECORD_PATTERN_DEF"/> @@ -312,14 +358,16 @@ + value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/> + + + - + value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/> @@ -329,12 +377,20 @@ - - + + + + + + - + + value="Method name ''{0}'' must match pattern ''{1}''."/> + + + + + @@ -354,11 +417,24 @@ - + + default="checkstyle-xpath-suppressions.xml" /> + + + + + + + + + + + + + - + \ No newline at end of file diff --git a/pom.xml b/pom.xml index de59c6a1..09cbf1c2 100644 --- a/pom.xml +++ b/pom.xml @@ -25,6 +25,7 @@ 3.10.0 2.44.2 3.6.0 + 10.21.3 3.25.5 @@ -143,6 +144,18 @@ com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier} + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.6.0 + + + com.puppycrawl.tools + checkstyle + ${checkstyle.version} + + + From 8a772408f40afef076bcefaa978198bc05d526d9 Mon Sep 17 00:00:00 2001 From: Korbik Date: Tue, 11 Mar 2025 00:08:56 +0100 Subject: [PATCH 4/7] Remove the reporting element --- pom.xml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/pom.xml b/pom.xml index 09cbf1c2..2393c856 100644 --- a/pom.xml +++ b/pom.xml @@ -268,24 +268,6 @@ - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - ${maven-checkstyle-plugin.version} - - - - checkstyle - - - - - - - com.google.protobuf From 82e7f0b40d0ee8b9e4af1b9c71e5be779fbf8990 Mon Sep 17 00:00:00 2001 From: Korbik Date: Tue, 11 Mar 2025 07:43:42 +0100 Subject: [PATCH 5/7] Include Test source and console output * Bump checkstyle version --- pom.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2393c856..74ede774 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 3.10.0 2.44.2 3.6.0 - 10.21.3 + 10.21.4 3.25.5 @@ -147,7 +147,12 @@ org.apache.maven.plugins maven-checkstyle-plugin - 3.6.0 + ${maven-checkstyle-plugin.version} + + checkstyle.xml + true + true + com.puppycrawl.tools From 905e6629d74cad41dab49bb97b781fdcaafa3f2d Mon Sep 17 00:00:00 2001 From: Korbik Date: Tue, 11 Mar 2025 07:57:03 +0100 Subject: [PATCH 6/7] Remove checkstyle.xml --- checkstyle.xml | 440 ------------------------------------------------- pom.xml | 4 +- 2 files changed, 1 insertion(+), 443 deletions(-) delete mode 100644 checkstyle.xml diff --git a/checkstyle.xml b/checkstyle.xml deleted file mode 100644 index 995c0f35..00000000 --- a/checkstyle.xml +++ /dev/null @@ -1,440 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index 74ede774..4b258f50 100644 --- a/pom.xml +++ b/pom.xml @@ -42,8 +42,6 @@ 2.30.2 1.20.4 1.20.4 - - checkstyle.xml @@ -149,7 +147,7 @@ maven-checkstyle-plugin ${maven-checkstyle-plugin.version} - checkstyle.xml + google_checks.xml true true From 3f1f5e8d4e24ed5283f03db447ac31c709b1b4cd Mon Sep 17 00:00:00 2001 From: Korbik Date: Tue, 11 Mar 2025 10:34:39 +0100 Subject: [PATCH 7/7] Spotless: add flowstring --- pom.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4b258f50..de8c9deb 100644 --- a/pom.xml +++ b/pom.xml @@ -255,7 +255,11 @@ ${spotless.version} - + + true + false + + google-java-format