<div dir="ltr">On Fri, Aug 2, 2013 at 2:58 PM, Ian Young <span dir="ltr">&lt;<a href="mailto:ian@iay.org.uk" target="_blank">ian@iay.org.uk</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

This is the note Scott was referring to.  Sorry, I just sent it to him originally as he said he was going to look into this.<br>
<br>
<a href="http://stackoverflow.com/questions/4023185/how-to-disable-a-particular-checkstyle-rule-for-a-particular-line-of-code" target="_blank">http://stackoverflow.com/questions/4023185/how-to-disable-a-particular-checkstyle-rule-for-a-particular-line-of-code</a><br>


<br>
One thing that only became apparent to me after reading this several times is that you need to include the SuppressionCommentFilter module in the Checkstyle configuration.  So, examples like Daniel&#39;s don&#39;t do anything as written unless you add this; they are just ignored.<br>


<br>
It also looks like the //CHECKSTYLE.OFF: WhichTestToDisable form is just sugar: it&#39;s not disabling just that test but everything, depending on what your SuppressionCommentFilter definition has in it.  Some examples here:<br>


<br>
<a href="http://checkstyle.sourceforge.net/config.html" target="_blank" rel="noreferrer">http://checkstyle.sourceforge.net/config.html</a></blockquote><div><br></div><div>This is the config I&#39;ve been using:</div><div>

<br></div><div>  &lt;module name=&quot;SuppressionCommentFilter&quot;&gt;</div><div>    &lt;property name=&quot;offCommentFormat&quot; value=&quot;CheckStyle\:([\w\|]+) OFF&quot;/&gt;</div><div>    &lt;property name=&quot;onCommentFormat&quot; value=&quot;CheckStyle\:([\w\|]+) ON&quot;/&gt;</div>

<div>    &lt;property name=&quot;checkFormat&quot; value=&quot;$1&quot;/&gt;</div><div>  &lt;/module&gt; </div><div><br></div><div>--DF</div><div><br></div></div></div></div>