rspec/rules/S1172/swift/rule.adoc

30 lines
386 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
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[]