Checkstyle disabling

Ian Young ian at iay.org.uk
Fri Aug 2 14:58:07 EDT 2013


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.

http://stackoverflow.com/questions/4023185/how-to-disable-a-particular-checkstyle-rule-for-a-particular-line-of-code 

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's don't do anything as written unless you add this; they are just ignored.

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

http://checkstyle.sourceforge.net/config.html

Enjoy,

	-- Ian



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4813 bytes
Desc: not available
Url : http://shibboleth.net/pipermail/dev/attachments/20130802/1b26631a/attachment.bin 


More information about the dev mailing list