rspec/rules/S1172/swift/rule.adoc

57 lines
833 B
Plaintext

== Why is this an issue?
include::../description.adoc[]
=== Exceptions
Override methods are excluded.
[source,swift]
----
override doSomething(a: Int, b: Int) { // no issue reported on b
compute(a)
}
----
== How to fix it
include::../how-to-fix-it.adoc[]
=== Code examples
==== Noncompliant code example
[source,swift,diff-id=1,diff-type=noncompliant]
----
func doSomething(a: Int, b: Int) { // "b" is unused
compute(a)
}
----
==== Compliant solution
[source,swift,diff-id=1,diff-type=compliant]
----
void doSomething(a: Int) {
compute(a)
}
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]