Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse shows warning for checkstyle SuppresWarnings that exists

In my Eclipse (Kepler 4.3) I have Checkstyle installed and working with a proper file (verification also happens through Jenkins). Nonetheless my Eclipse editor gives me a Warning for all my @SuppressWarnings("checkstyle:parameternumber")

The parameternumber value exists in the Checkstyle, as some of the developers do not have this issue. However we compared environments and could not figure our what was different. Does anyone here have an idea how to fix this issue?

public class MyClass {

@SuppressWarnings("checkstyle:parameternumber")
public MyClass(...multiple paramters...){
/*Implementation*/
}

When I remove this @SuppresWarnings I am getting a Checkstyle warning from Eclipse that I am using to many parameters. So it does recognize it I assume.

like image 834
Jurn Avatar asked Aug 02 '16 07:08

Jurn


1 Answers

You need to disable Eclipse checking the names in @SuppressWarnings, you can do it just like for PMD (exact same steps required):

To get Eclipse to not flag the @SuppressWarnings("PMD") annotation, look under the menu headings Java -> Compiler -> Errors/Warnings -> Annotations -> Unhandled Warning Token.

like image 86
Krzysztof Krasoń Avatar answered Oct 27 '22 08:10

Krzysztof Krasoń