
调试Spring源码时:Execution failed for task ‘:xxxx:checkStyleMain‘. > Checkstyle ruleviolations were found
源码的过程中,不可避免要写一些测试类,但是由于Spring源码项目中配置了。不过这些问题在我们阅读源码时,可以尽可能的忽略。为了提高阅读源码的效率,需要配置。,导致自己写的代码在。
·
问题描述
看Spring
源码的过程中,不可避免要写一些测试类,但是由于Spring源码项目中配置了checkstyle
,导致自己写的代码在build
时被检测出类似header.mismatch
的格式问题。不过这些问题在我们阅读源码时,可以尽可能的忽略。抓大放小。
解决办法
为了提高阅读源码的效率,需要配置checkStyle
忽略这些提示。
需要在spring-framework/src/checkstyle/checkstyle.xml
进行配置过滤器。
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="^.*\\spring\-user\\.*$"/>
</module>
上述配置可让checkStyle
排除spring-user
目录夹下的文件。
更多推荐
所有评论(0)