views:

32

answers:

2

Is there a way to make Eclipse/Javadoc give me warning for unused parameters? It can happen that my comments contain something like @param foo while I no longer use a parameter of the name foo in my method signature. I wish Eclipse would give me a warning when I compile that the parameter is not used, f.e. as a strike through.

Xcode does something like this: When you compile it puts a warning above the method that says: Warning: argument 'foo' of command @param is not found in the argument list of ... the method.

+1  A: 

I'm pretty sure that the Checkstyle or Findbugs eclipse plugins (possibly both) can do this.

Edit: added links Edit2: Here is a config file for checkstyle that checks Javadoc formatting of a method

Rulmeq
+2  A: 

It's available built-in, but disabled by default. You can enable it under:

Preferences > Java > Compiler > Javadoc > Validate tag arguments

Fabian Steeg