mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Add nohttp checkstyle rule
Closes gh-16682
This commit is contained in:
parent
72268a266b
commit
80d8a5cfa2
@ -17,7 +17,7 @@
|
|||||||
<url>https://www.spring.io</url>
|
<url>https://www.spring.io</url>
|
||||||
</organization>
|
</organization>
|
||||||
<properties>
|
<properties>
|
||||||
<main.basedir>..</main.basedir>
|
<main.basedir>${basedir}/..</main.basedir>
|
||||||
<disable.checks>false</disable.checks>
|
<disable.checks>false</disable.checks>
|
||||||
<java.version>1.6</java.version>
|
<java.version>1.6</java.version>
|
||||||
<aether.version>1.0.2.v20150114</aether.version>
|
<aether.version>1.0.2.v20150114</aether.version>
|
||||||
@ -25,6 +25,7 @@
|
|||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<maven.version>3.1.1</maven.version>
|
<maven.version>3.1.1</maven.version>
|
||||||
<spring-javaformat.version>0.0.9</spring-javaformat.version>
|
<spring-javaformat.version>0.0.9</spring-javaformat.version>
|
||||||
|
<nohttp-checkstyle.version>0.0.1.RELEASE</nohttp-checkstyle.version>
|
||||||
</properties>
|
</properties>
|
||||||
<scm>
|
<scm>
|
||||||
<url>https://github.com/spring-projects/spring-boot</url>
|
<url>https://github.com/spring-projects/spring-boot</url>
|
||||||
@ -318,6 +319,11 @@
|
|||||||
<artifactId>spring-javaformat-checkstyle</artifactId>
|
<artifactId>spring-javaformat-checkstyle</artifactId>
|
||||||
<version>${spring-javaformat.version}</version>
|
<version>${spring-javaformat.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.spring.nohttp</groupId>
|
||||||
|
<artifactId>nohttp-checkstyle</artifactId>
|
||||||
|
<version>${nohttp-checkstyle.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
@ -533,6 +539,8 @@
|
|||||||
<configLocation>src/checkstyle/checkstyle.xml</configLocation>
|
<configLocation>src/checkstyle/checkstyle.xml</configLocation>
|
||||||
<suppressionsLocation>src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
|
<suppressionsLocation>src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
|
||||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||||
|
<propertyExpansion>main.basedir=${main.basedir}</propertyExpansion>
|
||||||
|
<resourceIncludes>**\/*.*</resourceIncludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>check</goal>
|
<goal>check</goal>
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
|
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
|
||||||
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
|
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
|
||||||
<suppressions>
|
<suppressions>
|
||||||
|
<suppress files="[\\/]target[\\/]" checks=".*" />
|
||||||
|
<suppress files=".+\.[jar|git|ico|p12]" checks=".*" />
|
||||||
<suppress files="SpringApplicationTests\.java" checks="FinalClass" />
|
<suppress files="SpringApplicationTests\.java" checks="FinalClass" />
|
||||||
<suppress files=".+Configuration\.java" checks="HideUtilityClassConstructor" />
|
<suppress files=".+Configuration\.java" checks="HideUtilityClassConstructor" />
|
||||||
<suppress files=".+Application\.java" checks="HideUtilityClassConstructor" />
|
<suppress files=".+Application\.java" checks="HideUtilityClassConstructor" />
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "https://checkstyle.org/dtds/configuration_1_2.dtd">
|
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "https://checkstyle.org/dtds/configuration_1_2.dtd">
|
||||||
<module name="com.puppycrawl.tools.checkstyle.Checker">
|
<module name="com.puppycrawl.tools.checkstyle.Checker">
|
||||||
|
<module name="io.spring.nohttp.checkstyle.check.NoHttpCheck">
|
||||||
|
<property name="whitelistFileName" value="${main.basedir}/spring-boot-parent/src/checkstyle/nohttp-whitelist.txt"/>
|
||||||
|
</module>
|
||||||
<module name="io.spring.javaformat.checkstyle.SpringChecks" />
|
<module name="io.spring.javaformat.checkstyle.SpringChecks" />
|
||||||
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
|
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
|
||||||
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
|
<module name="com.puppycrawl.tools.checkstyle.checks.imports.IllegalImportCheck">
|
||||||
|
1
spring-boot-parent/src/checkstyle/nohttp-whitelist.txt
Normal file
1
spring-boot-parent/src/checkstyle/nohttp-whitelist.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
^http://livereload.com/protocols/official-7$
|
@ -20,6 +20,7 @@
|
|||||||
<main.basedir>${basedir}/..</main.basedir>
|
<main.basedir>${basedir}/..</main.basedir>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
<spring-javaformat.version>0.0.9</spring-javaformat.version>
|
<spring-javaformat.version>0.0.9</spring-javaformat.version>
|
||||||
|
<nohttp-checkstyle.version>0.0.1.RELEASE</nohttp-checkstyle.version>
|
||||||
<disable.checks>false</disable.checks>
|
<disable.checks>false</disable.checks>
|
||||||
</properties>
|
</properties>
|
||||||
<modules>
|
<modules>
|
||||||
@ -155,6 +156,11 @@
|
|||||||
<artifactId>spring-javaformat-checkstyle</artifactId>
|
<artifactId>spring-javaformat-checkstyle</artifactId>
|
||||||
<version>${spring-javaformat.version}</version>
|
<version>${spring-javaformat.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.spring.nohttp</groupId>
|
||||||
|
<artifactId>nohttp-checkstyle</artifactId>
|
||||||
|
<version>${nohttp-checkstyle.version}</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
@ -165,6 +171,8 @@
|
|||||||
<configLocation>../spring-boot-parent/src/checkstyle/checkstyle.xml</configLocation>
|
<configLocation>../spring-boot-parent/src/checkstyle/checkstyle.xml</configLocation>
|
||||||
<suppressionsLocation>../spring-boot-parent/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
|
<suppressionsLocation>../spring-boot-parent/src/checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
|
||||||
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||||
|
<propertyExpansion>main.basedir=${main.basedir}</propertyExpansion>
|
||||||
|
<resourceIncludes>**\/*.*</resourceIncludes>
|
||||||
</configuration>
|
</configuration>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>check</goal>
|
<goal>check</goal>
|
||||||
|
Loading…
Reference in New Issue
Block a user