rspec/rules/S1172/swift/rule.adoc

38 lines
525 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.
2021-02-02 15:02:10 +01:00
2020-06-30 12:47:33 +02:00
----
override doSomething(a: Int, b: Int) { // no issue reported on b
compute(a)
}
----
include::../see.adoc[]
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::rspecator-view[]