Actually, it is. It's just that the parameter needs to be unused in all implementations of the method. It even works locally for single-implementation methods (static, private, or constructor). While finding locally unused parameters for even multi-implementation would be easy(-ish), I'm not sure of the value. You couldn't remove the parameter, after all, without changing the program semantics
JS> Dave, Can you add an inspection to identify Unused parameters? This JS> inspection isn't covered by the built-in "Unused symbol" as JS> documented. JS> JS> Thanks, JS> Jon
Actually, it is. It's just that the parameter needs to be unused in all implementations of the method. It even works locally for single-implementation methods (static, private, or constructor). While finding locally unused parameters for even multi-implementation would be easy(-ish), I'm not sure of the value. You couldn't remove the parameter, after all, without changing the program semantics
For the built-in inspection, I see it working for the single implementations you mention. However, if a method does not implement or override and is final, it makes sense that the unused parameters should be flagged, but that doesn't happen presently. I'd like an option to have it mark the cases that Andrei requested.
However, if a method does not implement or override and is final, it makes sense that the unused parameters should be flagged, but that doesn't happen presently.
Did you try running Inspect Code? It is only shown there, not "on the fly" in the editor, since it requires a global analysis rather than a local method analysis.
Actually, it is. It's just that the parameter needs to be unused in all implementations of the method. It even works locally for single-implementation methods (static, private, or constructor). While finding locally unused parameters for even multi-implementation would be easy(-ish), I'm not sure of the value. You couldn't remove the parameter, after all, without changing the program semantics
You could also vote for http://www.intellij.net/tracker/idea/viewSCR?publicId=29842.
Andrei
JS> Dave, Can you add an inspection to identify Unused parameters? This
JS> inspection isn't covered by the built-in "Unused symbol" as
JS> documented.
JS>
JS> Thanks,
JS> Jon
Dave Griffith wrote:
For the built-in inspection, I see it working for the single
implementations you mention. However, if a method does not implement or
override and is final, it makes sense that the unused parameters should
be flagged, but that doesn't happen presently. I'd like an option to
have it mark the cases that Andrei requested.
Thanks,
Jon
Jon Steelman wrote:
Did you try running Inspect Code? It is only shown there, not "on the
fly" in the editor, since it requires a global analysis rather than a
local method analysis.