Skip to content

Commit d824e5d

Browse files
DATAGRAPH-1359 - Run Checkstyle in verify phase.
Checkstyle is configured to run in the validation phase in spring-data-parent, spring-data-neo4j used to use validate as well. Also, spring-data-neo4j has checkstyle configured to check the test sources as well. The later is done in test-compile. So checkstyle was executed indeed twice during validation, once for the sources and once for the test-compile. This commit changes spring-data-neo4j’s configuration to run in verify, after tests ran. This makes checkstyle only run once. For a quick look if all sources are correct, one can use ` ./mvnw checkstyle:check@verify` before running a full blown `./mvnw verify`. While the Java compiler now can flag invalid code immediate, checkstyle will discover the rest only afterwards. While working on this a flaw in the combine.self="override" attribute was discovered: It works of course only for the maven configurational attributes, not for the checkstyle rules themselve. Therefor the `io.spring.nohttp.checkstyle.check.NoHttpCheck` has been added to the local configuration as well. In the process of the bug fix, the sort pom plugin has been applied with the configuration as already available.
1 parent d4c0549 commit d824e5d

File tree

2 files changed

+190
-163
lines changed

2 files changed

+190
-163
lines changed

etc/checkstyle/config.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
<module name="NewlineAtEndOfFile"/>
2424
<module name="SuppressWarningsFilter" />
2525

26+
<module name="io.spring.nohttp.checkstyle.check.NoHttpCheck">
27+
<!-- XML requires double escaping, config gets XML-processed twice -->
28+
<property name="allowlist" value="http://www\.querydsl\.com.*&amp;#10;http://www\.prowaveconsulting\.com.*&amp;#10;http://www\.scispike\.com.*&amp;#10;http://.*.icu-project\.org.*" />
29+
</module>
30+
2631
<module name="com.puppycrawl.tools.checkstyle.TreeWalker">
2732
<module name="SuppressWarningsHolder" />
2833

0 commit comments

Comments
 (0)