Skip to content

Commit 1317cbc

Browse files
izeyewilkinsona
authored andcommitted
Apply UnnecessarySemicolonInEnumeration Checkstyle module
This commit also applies it to this project itself and fixes its violations. See gh-408
1 parent c31476f commit 1317cbc

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

spring-javaformat/spring-javaformat-checkstyle/src/main/resources/io/spring/javaformat/checkstyle/spring-checkstyle.xml

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
<property name="validateOnlyOverlapping" value="false" />
7171
</module>
7272
<module name="com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck" />
73+
<module name="com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonInEnumerationCheck"/>
7374

7475
<!-- Imports -->
7576
<module name="com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck" />

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

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

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

src/checkstyle/checkstyle.xml

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
<property name="validateOnlyOverlapping" value="false" />
6666
</module>
6767
<module name="com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck" />
68+
<module name="com.puppycrawl.tools.checkstyle.checks.coding.UnnecessarySemicolonInEnumerationCheck"/>
6869

6970
<!-- Imports -->
7071
<module name="com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck" />

0 commit comments

Comments
 (0)