redundant-return-type
all languagesstylefix: safedefault: off
What it does
Section titled “What it does”Removes a return type that the language gives every function with a block body anyway (fun f(): Unit { } in Kotlin; the types come from the option redundant_return_types). The functions are those with a block body, the type is the one after the colon that follows the parameters. The rule works in the formatter, which applies it when it is on (Kotlin has it on); sudsy lint makes no report for it.
Why it matters
Section titled “Why it matters”The type says nothing the reader does not already know, and it makes the signature longer. Unit is what a block body returns when it has no return of a value.
To fix, delete the colon and the type; the formatter does it.
Configuration
Section titled “Configuration”lint: rules: redundant-return-type: warn # off (default), warn, errorSuppress one line with sudsy-disable-next-line redundant-return-type in a comment of the file’s language.