How to add exception to 'VisibilityModifierCheck' all classes of certain package

25 views
Skip to first unread message

Bhushan Patil

unread,
Dec 20, 2015, 10:37:04 PM12/20/15
to checkstyle
Hello everyone,
    I am using ZK framework. In this framework, we have Java listener classes. In that, we have just have to declare widgets in Java class and framework automatically wires them(I don't use annotation to wire them). These all classes, such as Div, Window, Label, Textbox are in package org.zkoss.zul.*
    Variable of these classes has to be public. For all these variables, I am getting 'VisibilityModifierCheck' warning. How do I make exception for these classes of package org.zkoss.zul.* ?

Thanks,
Bhushan Patil

Roman Ivanov

unread,
Dec 21, 2015, 9:55:32 AM12/21/15
to Bhushan Patil, checkstyle
Hi Bhushan,

no way to do this. Check works only for general cases.

you need to use suppression/filter. Here is and example of how suppress certain Check on certain package classes - https://github.com/checkstyle/checkstyle/blob/master/config/suppressions.xml#L97

more examples and abilities to suppress violations are there - http://checkstyle.sourceforge.net/config_filters.html

thanks,
Roman Ivanov

--
You received this message because you are subscribed to the Google Groups "checkstyle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to checkstyle+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages