maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1690282 - /maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt.vm
Date Fri, 10 Jul 2015 16:07:30 GMT
Author: dkulp
Date: Fri Jul 10 16:07:30 2015
New Revision: 1690282

Add a note about the difference in behavior when checkstyle is configured in different phases.
This closes #56


Modified: maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt.vm
--- maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt.vm (original)
+++ maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt.vm Fri Jul 10 16:07:30
@@ -85,6 +85,8 @@ mvn checkstyle:checkstyle
   (Note in that for Maven 3, as per {{{}Maven
3 Compatibility Notes}},
   in Maven 3, options you set in the <<<\<reporting\>>>> element
do not have any effect on executions in the <<<\<build\>>>> element.)
+  Note that the phase that <<<checkstyle::check>>> is bound to is very
important.  If bound to the validate phase, it would check the code prior to compiling the
code.  If the code is invalid, the parsing errors reported by checkstyle may be different
than what would be expected from the javac compiler.  However, it's guaranteed to run.   Another
popular option is to bind it to the verify phase which would run much later (and allow the
javac compiler to flag invalid code prior to checkstyle).   However, if developers generally
just use "mvn test" prior to pushing changes, checkstyle would not run as verify occurs after
the test phase.
   For example:

View raw message