I try to ignore or disable some useless warnings in eclipse by checkstyle with annotation @SuppressWarnings
like
How to disable a particular checkstyle rule for a particular line of code?
but this don't work for me.
Here is the checkstyle.xml
<module name="Checker">
<property name="severity" value="warning"/>
<module name="SuppressWarningsFilter"/>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<module name="FileContentsHolder"/>
<module name="SuppressWarningsHolder"/>
<module name="CyclomaticComplexity"/>
...
and here the java code:
@SuppressWarnings("checkstyle:CyclomaticComplexity")
public void doSomeThing() {
...
}
Also set the value of warning to "all" @SuppressWarnings("all")
or @SuppressWarnings("CyclomaticComplexity")
, @SuppressWarnings("cyclomaticcomplexity")
is without any result.
The documentation of checkstyle is poor. Some ideas?