Skip to content

Commit 26cffe0

Browse files
committed
Use global plugin configuration for checkstyle
1 parent 844bb61 commit 26cffe0

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

pom.xml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,23 @@
133133
<groupId>org.apache.maven.plugins</groupId>
134134
<artifactId>maven-checkstyle-plugin</artifactId>
135135
<version>${maven.checkstyle.plugin.version}</version>
136+
<configuration>
137+
<includeResources>false</includeResources>
138+
<includeTestResources>false</includeTestResources>
139+
<includeTestSourceDirectory>true</includeTestSourceDirectory>
140+
<configLocation>
141+
https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-${checkstyle.version}/config/checkstyle-checks.xml
142+
</configLocation>
143+
<propertiesLocation>config/checkstyle.properties</propertiesLocation>
144+
<failOnViolation>true</failOnViolation>
145+
<logViolationsToConsole>true</logViolationsToConsole>
146+
<maxAllowedViolations>0</maxAllowedViolations>
147+
<violationSeverity>error</violationSeverity>
148+
<outputFileFormat>xml</outputFileFormat>
149+
<outputFile>
150+
${project.build.directory}/checkstyle/checkstyle-report.xml
151+
</outputFile>
152+
</configuration>
136153
<dependencies>
137154
<dependency>
138155
<groupId>com.puppycrawl.tools</groupId>
@@ -146,23 +163,6 @@
146163
<goals>
147164
<goal>check</goal>
148165
</goals>
149-
<configuration>
150-
<includeResources>false</includeResources>
151-
<includeTestResources>false</includeTestResources>
152-
<includeTestSourceDirectory>true</includeTestSourceDirectory>
153-
<configLocation>
154-
https://raw.githubusercontent.com/checkstyle/checkstyle/checkstyle-${checkstyle.version}/config/checkstyle-checks.xml
155-
</configLocation>
156-
<propertiesLocation>config/checkstyle.properties</propertiesLocation>
157-
<failOnViolation>true</failOnViolation>
158-
<logViolationsToConsole>true</logViolationsToConsole>
159-
<maxAllowedViolations>0</maxAllowedViolations>
160-
<violationSeverity>error</violationSeverity>
161-
<outputFileFormat>xml</outputFileFormat>
162-
<outputFile>
163-
${project.build.directory}/checkstyle/checkstyle-report.xml
164-
</outputFile>
165-
</configuration>
166166
</execution>
167167
</executions>
168168
</plugin>

0 commit comments

Comments
 (0)