Skip to content

Commit a62f004

Browse files
committed
Apply UnnecessarySemicolonInEnumeration Checkstyle module
This commit also applies it to this project itself and fixes its violations.
1 parent 7db7c97 commit a62f004

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

Diff for: spring-javaformat/spring-javaformat-checkstyle/src/main/resources/io/spring/javaformat/checkstyle/spring-checkstyle.xml

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@
113113
<module name="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck" />
114114
<module name="com.puppycrawl.tools.checkstyle.checks.ArrayTypeStyleCheck" />
115115
<module name="com.puppycrawl.tools.checkstyle.checks.OuterTypeFilenameCheck" />
116+
<module name="com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonInEnumerationCheck"/>
116117

117118
<!-- Modifiers -->
118119
<module name="com.puppycrawl.tools.checkstyle.checks.modifier.RedundantModifierCheck" />

Diff for: spring-javaformat/spring-javaformat-checkstyle/src/test/java/io/spring/javaformat/checkstyle/SpringConfigurationLoaderTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void loadShouldLoadChecks() {
4848
assertThat(checks).hasSize(5);
4949
TreeWalker treeWalker = (TreeWalker) checks.toArray()[4];
5050
Set<?> ordinaryChecks = (Set<?>) Extractors.byName("ordinaryChecks").extract(treeWalker);
51-
assertThat(ordinaryChecks).hasSize(60);
51+
assertThat(ordinaryChecks).hasSize(61);
5252
}
5353

5454
@Test
@@ -59,7 +59,7 @@ public void loadWithExcludeShouldExcludeChecks() {
5959
assertThat(checks).hasSize(5);
6060
TreeWalker treeWalker = (TreeWalker) checks.toArray()[4];
6161
Set<?> ordinaryChecks = (Set<?>) Extractors.byName("ordinaryChecks").extract(treeWalker);
62-
assertThat(ordinaryChecks).hasSize(59);
62+
assertThat(ordinaryChecks).hasSize(60);
6363
}
6464

6565
@Test

Diff for: spring-javaformat/spring-javaformat-formatter-eclipse-jdt-jdk17/src/main/java/org/eclipse/jdt/internal/formatter/Preparator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ enum Phase {
5454
/**
5555
* Apply the preparator after wrapping.
5656
*/
57-
POST_WRAPPING;
57+
POST_WRAPPING
5858

5959
}
6060

Diff for: spring-javaformat/spring-javaformat-formatter-eclipse-jdt-jdk8/src/main/java/org/eclipse/jdt/internal/formatter/Preparator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ enum Phase {
5454
/**
5555
* Apply the preparator after wrapping.
5656
*/
57-
POST_WRAPPING;
57+
POST_WRAPPING
5858

5959
}
6060

Diff for: src/checkstyle/checkstyle.xml

+1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
<module name="com.puppycrawl.tools.checkstyle.checks.UpperEllCheck" />
118118
<module name="com.puppycrawl.tools.checkstyle.checks.ArrayTypeStyleCheck" />
119119
<module name="com.puppycrawl.tools.checkstyle.checks.OuterTypeFilenameCheck" />
120+
<module name="com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonInEnumerationCheck"/>
120121

121122
<!-- Modifiers -->
122123
<module name="com.puppycrawl.tools.checkstyle.checks.modifier.RedundantModifierCheck" />

0 commit comments

Comments
 (0)