Skip to content

Commit ab438e4

Browse files
committed
Merge pull request #408 from izeye
* gh-408: Polish "Apply UnnecessarySemicolonInEnumeration Checkstyle module" Apply UnnecessarySemicolonInEnumeration Checkstyle module Closes gh-408
2 parents c31476f + fd65dcd commit ab438e4

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
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

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2023 the original author or authors.
2+
* Copyright 2017-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2021 the original author or authors.
2+
* Copyright 2017-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -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)