Skip to content

Files

Latest commit

 

History

History
27 lines (18 loc) · 413 Bytes

UnusedParameter.md

File metadata and controls

27 lines (18 loc) · 413 Bytes

Pattern: Unused parameter

Issue: -

Description

An unused parameter can be removed to simplify the signature of the function.

Example of incorrect code:

fun foo(unused: String) {
  println()
}

Example of correct code:

fun foo(used: String) {
  println(used)
}

Further Reading