You might also mention the interaction with generated code.

On Fri, Jul 10, 2015 at 12:07 PM,  <[email protected]> wrote:
> Author: dkulp
> Date: Fri Jul 10 16:07:30 2015
> New Revision: 1690282
>
> URL: http://svn.apache.org/r1690282
> Log:
> 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
>
> Modified: 
> maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt.vm
> URL: 
> http://svn.apache.org/viewvc/maven/plugins/trunk/maven-checkstyle-plugin/src/site/apt/usage.apt.vm?rev=1690282&r1=1690281&r2=1690282&view=diff
> ==============================================================================
> --- 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 2015
> @@ -85,6 +85,8 @@ mvn checkstyle:checkstyle
>    (Note in that for Maven 3, as per 
> {{{https://cwiki.apache.org/confluence/display/MAVEN/Maven+3.x+Compatibility+Notes}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:
>
>  +------+
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to