Skip to content

Commit 67d2635

Browse files
pinguin3245678bclozel
authored andcommitted
Sync checkstyle on buildSrc
Closes spring-projectsgh-34434 Signed-off-by: Vincent Potucek <[email protected]>
1 parent 63f6c33 commit 67d2635

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed
+6-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
3-
<module name="com.puppycrawl.tools.checkstyle.Checker">
3+
<module name="Checker">
44

55
<!-- Root Checks -->
66
<module name="io.spring.javaformat.checkstyle.check.SpringHeaderCheck">
@@ -12,16 +12,15 @@
1212
<module name="com.puppycrawl.tools.checkstyle.checks.NewlineAtEndOfFileCheck"/>
1313

1414
<!-- TreeWalker Checks -->
15-
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
15+
<module name="TreeWalker">
1616

1717
<!-- Imports -->
18-
<module name="com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck">
19-
<property name="processJavadoc" value="true"/>
20-
</module>
21-
18+
<module name="AvoidStarImport"/>
19+
<module name="UnusedImports"/>
20+
<module name="RedundantImport"/>
2221
<!-- Modifiers -->
2322
<module name="com.puppycrawl.tools.checkstyle.checks.modifier.ModifierOrderCheck"/>
2423

2524
</module>
2625

27-
</module>
26+
</module>

buildSrc/src/main/java/org/springframework/build/architecture/ArchitectureCheck.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,12 @@
4444
import org.gradle.api.tasks.SkipWhenEmpty;
4545
import org.gradle.api.tasks.TaskAction;
4646

47-
import static org.springframework.build.architecture.ArchitectureRules.*;
47+
import static org.springframework.build.architecture.ArchitectureRules.allPackagesShouldBeFreeOfTangles;
48+
import static org.springframework.build.architecture.ArchitectureRules.classesShouldNotImportForbiddenTypes;
49+
import static org.springframework.build.architecture.ArchitectureRules.javaClassesShouldNotImportKotlinAnnotations;
50+
import static org.springframework.build.architecture.ArchitectureRules.noClassesShouldCallStringToLowerCaseWithoutLocale;
51+
import static org.springframework.build.architecture.ArchitectureRules.noClassesShouldCallStringToUpperCaseWithoutLocale;
52+
import static org.springframework.build.architecture.ArchitectureRules.packageInfoShouldBeNullMarked;
4853

4954
/**
5055
* {@link Task} that checks for architecture problems.

src/checkstyle/checkstyle.xml

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd">
3-
<module name="com.puppycrawl.tools.checkstyle.Checker">
3+
<module name="Checker">
44

55
<!-- Suppressions -->
66
<module name="SuppressionFilter">
@@ -18,7 +18,7 @@
1818
<module name="JavadocPackage" /><!-- package-info.java -->
1919

2020
<!-- TreeWalker Checks -->
21-
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
21+
<module name="TreeWalker">
2222

2323
<!-- Annotations -->
2424
<module name="com.puppycrawl.tools.checkstyle.checks.annotation.AnnotationUseStyleCheck">
@@ -89,11 +89,9 @@
8989
<module name="com.puppycrawl.tools.checkstyle.checks.coding.OneStatementPerLineCheck"/>
9090

9191
<!-- Imports -->
92-
<module name="com.puppycrawl.tools.checkstyle.checks.imports.AvoidStarImportCheck"/>
93-
<module name="com.puppycrawl.tools.checkstyle.checks.imports.RedundantImportCheck"/>
94-
<module name="com.puppycrawl.tools.checkstyle.checks.imports.UnusedImportsCheck">
95-
<property name="processJavadoc" value="true"/>
96-
</module>
92+
<module name="AvoidStarImport"/>
93+
<module name="UnusedImports"/>
94+
<module name="RedundantImport"/>
9795
<module name="com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck">
9896
<property name="groups" value="java,javax,*,org.springframework"/>
9997
<property name="ordered" value="true"/>

0 commit comments

Comments
 (0)