30 lines
386 B
Plaintext
30 lines
386 B
Plaintext
![]() |
include::../description.adoc[]
|
||
|
|
||
|
== Noncompliant Code Example
|
||
|
|
||
|
----
|
||
|
func doSomething(a: Int, b: Int) { // "b" is unused
|
||
|
compute(a)
|
||
|
}
|
||
|
----
|
||
|
|
||
|
== Compliant Solution
|
||
|
|
||
|
----
|
||
|
void doSomething(a: Int) {
|
||
|
compute(a)
|
||
|
}
|
||
|
----
|
||
|
|
||
|
== Exceptions
|
||
|
|
||
|
Override methods are excluded.
|
||
|
|
||
|
----
|
||
|
override doSomething(a: Int, b: Int) { // no issue reported on b
|
||
|
compute(a)
|
||
|
}
|
||
|
----
|
||
|
|
||
|
include::../see.adoc[]
|