我尝试将自定义checkstyle.xml
配置而不是标准连接sun_checks.xml
到这个项目。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle.version}</version>
<configuration>
<configLocation>src/main/resources/checkstyle.xml</configLocation>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
但是mvn -B clean verify checkstyle:checkstyle
得到输出sun_checks.xml
[INFO] There are 206 errors reported by Checkstyle 8.29 with sun_checks.xml ruleset.
为什么<configLocation>
会被忽略,以及如何修复它?