Skip to content

Commit fb24b5a

Browse files
wilkinsonaphilwebb
authored andcommitted
Separate nottp checkstyle configuration
See gh-16682
1 parent ede197f commit fb24b5a

File tree

8 files changed

+71
-9
lines changed

8 files changed

+71
-9
lines changed

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
<artifactId>replacer</artifactId>
6565
<version>1.5.3</version>
6666
</plugin>
67-
6867
</plugins>
6968
</pluginManagement>
7069
</build>

spring-boot-parent/pom.xml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,40 @@
539539
<configLocation>src/checkstyle/checkstyle.xml</configLocation>
540540
<suppressionsLocation>src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
541541
<includeTestSourceDirectory>true</includeTestSourceDirectory>
542+
</configuration>
543+
<goals>
544+
<goal>check</goal>
545+
</goals>
546+
</execution>
547+
<execution>
548+
<id>nohttp-checkstyle-validation</id>
549+
<phase>validate</phase>
550+
<configuration>
551+
<skip>${disable.checks}</skip>
552+
<configLocation>src/checkstyle/nohttp-checkstyle.xml</configLocation>
553+
<suppressionsLocation>src/checkstyle/nohttp-checkstyle-suppressions.xml</suppressionsLocation>
554+
<propertyExpansion>main.basedir=${main.basedir}</propertyExpansion>
555+
<sourceDirectories>./</sourceDirectories>
556+
<includes>**/*</includes>
557+
<excludes>.git/**/*,target/**/*</excludes>
558+
</configuration>
559+
<goals>
560+
<goal>check</goal>
561+
</goals>
562+
</execution>
563+
</executions>
564+
</plugin>
565+
<plugin>
566+
<groupId>org.apache.maven.plugins</groupId>
567+
<artifactId>maven-checkstyle-plugin</artifactId>
568+
<executions>
569+
<execution>
570+
<id>nohttp-checkstyle-validation</id>
571+
<phase>validate</phase>
572+
<configuration>
573+
<skip>${disable.checks}</skip>
574+
<configLocation>src/checkstyle/nohttp-checkstyle.xml</configLocation>
575+
<suppressionsLocation>src/checkstyle/nohttp-checkstyle-suppressions.xml</suppressionsLocation>
542576
<propertyExpansion>main.basedir=${main.basedir}</propertyExpansion>
543577
<sourceDirectories>./</sourceDirectories>
544578
<includes>**/*</includes>

spring-boot-parent/src/checkstyle/checkstyle-suppressions.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
44
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
55
<suppressions>
6-
<suppress files="[\\/]transaction-logs[\\/]" checks=".*" />
76
<suppress files="[\\/]target[\\/]" checks=".*" />
8-
<suppress files="[\\/]build.log" checks=".*" />
9-
<suppress files=".+\.(jar|git|ico|p12)" checks=".*" />
10-
<suppress files="dependency-reduced-pom.xml" checks="NoHttp" />
117
<suppress files="SpringApplicationTests\.java" checks="FinalClass" />
128
<suppress files=".+Configuration\.java" checks="HideUtilityClassConstructor" />
139
<suppress files=".+Application\.java" checks="HideUtilityClassConstructor" />

spring-boot-parent/src/checkstyle/checkstyle.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "https://checkstyle.org/dtds/configuration_1_2.dtd">
33
<module name="com.puppycrawl.tools.checkstyle.Checker">
4-
<module name="io.spring.nohttp.checkstyle.check.NoHttpCheck">
5-
<property name="whitelistFileName" value="${main.basedir}/spring-boot-parent/src/checkstyle/nohttp-whitelist.txt"/>
6-
</module>
74
<module name="io.spring.javaformat.checkstyle.SpringChecks" />
85
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
96
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE suppressions PUBLIC
3+
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
4+
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
5+
<suppressions>
6+
<suppress files="[\\/]transaction-logs[\\/]" checks="NoHttp" />
7+
<suppress files="[\\/]target[\\/]" checks="NoHttp" />
8+
<suppress files="[\\/]build.log" checks="NoHttp" />
9+
<suppress files=".+\.(jar|git|ico|p12|gif|jks|jpg)" checks="NoHttp" />
10+
<suppress files="dependency-reduced-pom.xml" checks="NoHttp" />
11+
<suppress files="jquery.validate.js" checks="NoHttp" />
12+
<suppress files="jquery-[0-9]\.[0-9]\.[0-9].js" checks="NoHttp" />
13+
</suppressions>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0"?>
2+
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "https://checkstyle.org/dtds/configuration_1_2.dtd">
3+
<module name="com.puppycrawl.tools.checkstyle.Checker">
4+
<module name="io.spring.nohttp.checkstyle.check.NoHttpCheck">
5+
<property name="whitelistFileName" value="${main.basedir}/spring-boot-parent/src/checkstyle/nohttp-whitelist.txt"/>
6+
</module>
7+
</module>
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1-
^http://livereload.com/protocols/official-7.*
1+
^http://docs.groovy-lang.org.*
22
^http://exslt.org/common.*
3+
^http://groovy-lang.org.*
4+
^http://hsqldb.org.*
5+
^http://livereload.com/.*
6+
^http://www.jdotsoft.com.*

spring-boot-samples/pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,18 @@
171171
<configLocation>../spring-boot-parent/src/checkstyle/checkstyle.xml</configLocation>
172172
<suppressionsLocation>../spring-boot-parent/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
173173
<includeTestSourceDirectory>true</includeTestSourceDirectory>
174+
</configuration>
175+
<goals>
176+
<goal>check</goal>
177+
</goals>
178+
</execution>
179+
<execution>
180+
<id>nohttp-checkstyle-validation</id>
181+
<phase>validate</phase>
182+
<configuration>
183+
<skip>${disable.checks}</skip>
184+
<configLocation>../spring-boot-parent/src/checkstyle/nohttp-checkstyle.xml</configLocation>
185+
<suppressionsLocation>../spring-boot-parent/src/checkstyle/nohttp-checkstyle-suppressions.xml</suppressionsLocation>
174186
<propertyExpansion>main.basedir=${main.basedir}</propertyExpansion>
175187
<sourceDirectories>./</sourceDirectories>
176188
<includes>**/*</includes>

0 commit comments

Comments
 (0)