-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Milestone
Description
code like:
public class MyObjTest {
@Test(expected = IllegalArgumentException.class) // violation should be there
public void getNameWithNullValue() {
MyObj obj = new MyObj();
myObj.setName(null);
}
}
update
checkstyle/config/checkstyle_checks.xml
Lines 397 to 401 in 8d0b729
<module name="MatchXpath"> | |
<property name="query" value="//CLASS_DEF[@text!='Checker' and @text!='Main'] | |
//LITERAL_CATCH//METHOD_CALL[.//IDENT[@text = 'printStackTrace']]/.."/> | |
<message key="matchxpath.match" value="Avoid using 'printStackTrace'."/> | |
</module> |
to find expected
element in code instead of search of printstacktrace in code as it is duplicate of other valiidations.
We need to add this config to our javadoc/xdoc/html.