[Codenarc-user] UnusedMethodParameter rule with inheritance
Brought to you by:
chrismair
From: Roshan D. <ros...@gm...> - 2011-12-15 12:03:43
|
Hi, For the code below, CodeNarc complains that A.foo() does not use method parameter 'x'. In the base implementation, there is no need to use 'x', but the subclasses do. Is there any way I can avoid this warning for class A? class A { protected foo(x) { // base implementation leaves x unused } } class B extends A { protected foo(x) { // this overridden implementation uses x } } -- Roshan Lucy.me: http://www.lucy.me/roshan Blog: http://roshandawrani.wordpress.com/ |