mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 20:25:50 +00:00
Make maven and gradle share checkstyle configuration
This commit is contained in:
parent
da1c93d367
commit
a2f1ad5503
4 changed files with 13 additions and 13 deletions
|
@ -54,7 +54,13 @@ tasks.named('test') {
|
||||||
}
|
}
|
||||||
|
|
||||||
checkstyle {
|
checkstyle {
|
||||||
configFile file("${project.rootDir}/src/checkstyle/nohttp-checkstyle.xml")
|
configDirectory = project.file('src/checkstyle')
|
||||||
|
configFile = file('src/checkstyle/nohttp-checkstyle.xml')
|
||||||
|
}
|
||||||
|
|
||||||
|
checkstyleNohttp {
|
||||||
|
configDirectory = project.file('src/checkstyle')
|
||||||
|
configFile = file('src/checkstyle/nohttp-checkstyle.xml')
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("formatMain").configure { dependsOn("checkstyleMain") }
|
tasks.named("formatMain").configure { dependsOn("checkstyleMain") }
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
<?xml version="1.0"?>
|
|
||||||
<!DOCTYPE suppressions PUBLIC
|
|
||||||
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
|
|
||||||
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
|
|
||||||
<suppressions>
|
|
||||||
<suppress files="node_modules[\\/].*" checks=".*"/>
|
|
||||||
<suppress files="node[\\/].*" checks=".*"/>
|
|
||||||
<suppress files="build[\\/].*" checks=".*"/>
|
|
||||||
<suppress files="target[\\/].*" checks=".*"/>
|
|
||||||
<suppress files=".+\.(jar|git|ico|p12|gif|jks|jpg|svg|log)" checks="NoHttp"/>
|
|
||||||
</suppressions>
|
|
4
pom.xml
4
pom.xml
|
@ -198,10 +198,12 @@
|
||||||
<phase>validate</phase>
|
<phase>validate</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<configLocation>src/checkstyle/nohttp-checkstyle.xml</configLocation>
|
<configLocation>src/checkstyle/nohttp-checkstyle.xml</configLocation>
|
||||||
<suppressionsLocation>src/checkstyle/nohttp-checkstyle-suppressions.xml</suppressionsLocation>
|
|
||||||
<sourceDirectories>${basedir}</sourceDirectories>
|
<sourceDirectories>${basedir}</sourceDirectories>
|
||||||
<includes>**/*</includes>
|
<includes>**/*</includes>
|
||||||
<excludes>**/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class</excludes>
|
<excludes>**/.git/**/*,**/.idea/**/*,**/target/**/,**/.flattened-pom.xml,**/*.class</excludes>
|
||||||
|
<propertyExpansion>
|
||||||
|
config_loc=${basedir}/src/checkstyle/
|
||||||
|
</propertyExpansion>
|
||||||
</configuration>
|
</configuration>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>check</goal>
|
<goal>check</goal>
|
||||||
|
|
|
@ -4,4 +4,7 @@
|
||||||
"https://checkstyle.org/dtds/configuration_1_2.dtd">
|
"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"/>
|
<module name="io.spring.nohttp.checkstyle.check.NoHttpCheck"/>
|
||||||
|
<module name="SuppressionFilter">
|
||||||
|
<property name="file" value="${config_loc}/nohttp-checkstyle-suppressions.xml"/>
|
||||||
|
</module>
|
||||||
</module>
|
</module>
|
||||||
|
|
Loading…
Reference in a new issue