diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/SpringChecks.java b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/SpringChecks.java index 0627d58e..b6f29260 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/SpringChecks.java +++ b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/SpringChecks.java @@ -39,7 +39,7 @@ import com.puppycrawl.tools.checkstyle.api.FileText; import com.puppycrawl.tools.checkstyle.api.LocalizedMessage; import com.puppycrawl.tools.checkstyle.filters.SuppressElement; -import io.spring.javaformat.checkstyle.check.HeaderCheck; +import io.spring.javaformat.checkstyle.check.SpringHeaderCheck; /** * {@link FileSetCheck} that applies Spring checkstype rules. @@ -60,9 +60,9 @@ public class SpringChecks extends AbstractFileSetCheck implements ExternalResour private boolean debug; - private String headerType = HeaderCheck.DEFAULT_HEADER_TYPE; + private String headerType = SpringHeaderCheck.DEFAULT_HEADER_TYPE; - private String headerCopyrightPattern = HeaderCheck.DEFAULT_HEADER_COPYRIGHT_PATTERN; + private String headerCopyrightPattern = SpringHeaderCheck.DEFAULT_HEADER_COPYRIGHT_PATTERN; /** * Sets tab width. diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/CatchCheck.java b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringCatchCheck.java similarity index 97% rename from spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/CatchCheck.java rename to spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringCatchCheck.java index 21fe290d..e218c97d 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/CatchCheck.java +++ b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringCatchCheck.java @@ -26,7 +26,7 @@ * * @author Phillip Webb */ -public class CatchCheck extends AbstractCheck { +public class SpringCatchCheck extends AbstractCheck { @Override public int[] getDefaultTokens() { diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/HeaderCheck.java b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringHeaderCheck.java similarity index 98% rename from spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/HeaderCheck.java rename to spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringHeaderCheck.java index d37de968..c0fa7f3e 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/HeaderCheck.java +++ b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringHeaderCheck.java @@ -37,7 +37,7 @@ * * @author Phillip Webb */ -public class HeaderCheck extends AbstractFileSetCheck { +public class SpringHeaderCheck extends AbstractFileSetCheck { private static final String UNCHECKED = "unchecked"; diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/JavadocCheck.java b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringJavadocCheck.java similarity index 98% rename from spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/JavadocCheck.java rename to spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringJavadocCheck.java index ff0eceaf..1cab857d 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/JavadocCheck.java +++ b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringJavadocCheck.java @@ -30,7 +30,7 @@ * * @author Phillip Webb */ -public class JavadocCheck extends AbstractCheck { +public class SpringJavadocCheck extends AbstractCheck { private static final Pattern[] PATTERNS = { CommonUtils.createPattern("@param\\s+\\S+\\s+(.*)"), diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/LambdaCheck.java b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringLambdaCheck.java similarity index 97% rename from spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/LambdaCheck.java rename to spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringLambdaCheck.java index bb39de33..3c791dfb 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/LambdaCheck.java +++ b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringLambdaCheck.java @@ -28,7 +28,7 @@ * * @author Phillip Webb */ -public class LambdaCheck extends AbstractCheck { +public class SpringLambdaCheck extends AbstractCheck { @Override public int[] getDefaultTokens() { diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/TernaryCheck.java b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringTernaryCheck.java similarity index 97% rename from spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/TernaryCheck.java rename to spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringTernaryCheck.java index ac921a16..22a6f5f3 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/TernaryCheck.java +++ b/spring-javaformat/spring-javaformat-checkstyle/src/main/java/io/spring/javaformat/checkstyle/check/SpringTernaryCheck.java @@ -27,7 +27,7 @@ * * @author Phillip Webb */ -public class TernaryCheck extends AbstractCheck { +public class SpringTernaryCheck extends AbstractCheck { @Override public int[] getDefaultTokens() { diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/main/resources/io/spring/javaformat/checkstyle/spring-checkstyle.xml b/spring-javaformat/spring-javaformat-checkstyle/src/main/resources/io/spring/javaformat/checkstyle/spring-checkstyle.xml index 3f908c2e..2d687831 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/main/resources/io/spring/javaformat/checkstyle/spring-checkstyle.xml +++ b/spring-javaformat/spring-javaformat-checkstyle/src/main/resources/io/spring/javaformat/checkstyle/spring-checkstyle.xml @@ -2,7 +2,7 @@ - + @@ -164,9 +164,9 @@ - - - - + + + + diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/test/java/io/spring/javaformat/checkstyle/SpringConfigurationLoaderTests.java b/spring-javaformat/spring-javaformat-checkstyle/src/test/java/io/spring/javaformat/checkstyle/SpringConfigurationLoaderTests.java index 2ad1e748..962e74cf 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/test/java/io/spring/javaformat/checkstyle/SpringConfigurationLoaderTests.java +++ b/spring-javaformat/spring-javaformat-checkstyle/src/test/java/io/spring/javaformat/checkstyle/SpringConfigurationLoaderTests.java @@ -25,7 +25,7 @@ import com.puppycrawl.tools.checkstyle.PropertiesExpander; import com.puppycrawl.tools.checkstyle.PropertyResolver; import com.puppycrawl.tools.checkstyle.api.FileSetCheck; -import io.spring.javaformat.checkstyle.check.HeaderCheck; +import io.spring.javaformat.checkstyle.check.SpringHeaderCheck; import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; @@ -51,9 +51,9 @@ public void loadShouldLoadChecks() { private PropertyResolver getPropertyResolver() { Properties properties = new Properties(); - properties.put("headerType", HeaderCheck.DEFAULT_HEADER_TYPE); + properties.put("headerType", SpringHeaderCheck.DEFAULT_HEADER_TYPE); properties.put("headerCopyrightPattern", - HeaderCheck.DEFAULT_HEADER_COPYRIGHT_PATTERN); + SpringHeaderCheck.DEFAULT_HEADER_COPYRIGHT_PATTERN); return new PropertiesExpander(properties); } diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderDate.txt b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderDate.txt index d16b8aa9..cb61a4b8 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderDate.txt +++ b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderDate.txt @@ -1 +1 @@ -+HeaderDate.java:2: header.mismatch [Header] ++HeaderDate.java:2: header.mismatch [SpringHeader] diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderMismatch.txt b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderMismatch.txt index 67bd9579..49868389 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderMismatch.txt +++ b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderMismatch.txt @@ -1 +1 @@ -+HeaderMismatch.java:5: header.mismatch [Header] \ No newline at end of file ++HeaderMismatch.java:5: header.mismatch [SpringHeader] \ No newline at end of file diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderTooLong.txt b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderTooLong.txt index 8442ae00..1c85c9e3 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderTooLong.txt +++ b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderTooLong.txt @@ -1 +1 @@ -+HeaderTooLong.java:15: header.mismatch [Header] ++HeaderTooLong.java:15: header.mismatch [SpringHeader] diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderTooShort.txt b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderTooShort.txt index c8cccff0..856886e8 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderTooShort.txt +++ b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/HeaderTooShort.txt @@ -1 +1 @@ -+HeaderTooShort.java:14: header.mismatch [Header] ++HeaderTooShort.java:14: header.mismatch [SpringHeader] diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/JavadocBadCase.txt b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/JavadocBadCase.txt index 64abda43..b128f3d4 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/JavadocBadCase.txt +++ b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/JavadocBadCase.txt @@ -1,5 +1,5 @@ -+JavadocBadCase.java:20:15: Javadoc element descriptions should not start with an uppercase letter [Javadoc] -+JavadocBadCase.java:27:29: Javadoc element descriptions should not start with an uppercase letter [Javadoc] -+JavadocBadCase.java:28:20: Javadoc element descriptions should not start with an uppercase letter [Javadoc] -+JavadocBadCase.java:29:37: Javadoc element descriptions should not start with an uppercase letter [Javadoc] ++JavadocBadCase.java:20:15: Javadoc element descriptions should not start with an uppercase letter [SpringJavadoc] ++JavadocBadCase.java:27:29: Javadoc element descriptions should not start with an uppercase letter [SpringJavadoc] ++JavadocBadCase.java:28:20: Javadoc element descriptions should not start with an uppercase letter [SpringJavadoc] ++JavadocBadCase.java:29:37: Javadoc element descriptions should not start with an uppercase letter [SpringJavadoc] +4 errors \ No newline at end of file diff --git a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/LambdaMissingParens.txt b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/LambdaMissingParens.txt index 5abe202a..0a88163d 100644 --- a/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/LambdaMissingParens.txt +++ b/spring-javaformat/spring-javaformat-checkstyle/src/test/resources/check/LambdaMissingParens.txt @@ -1 +1 @@ -+Lambda argument missing parentheses [Lambda] \ No newline at end of file ++Lambda argument missing parentheses [SpringLambda] \ No newline at end of file