Skip to content

joined_default_parameter

Ian Applebaum edited this page Jun 13, 2020 · 1 revision

Joined Default Parameter

Discouraged explicit usage of the default separator.

  • Identifier: joined_default_parameter
  • Enabled by default: Disabled
  • Supports autocorrection: Yes
  • Kind: idiomatic
  • Analyzer rule: No
  • Minimum Swift compiler version: 3.0.0
  • Default configuration: warning

Non Triggering Examples

let foo = bar.joined()
let foo = bar.joined(separator: ",")
let foo = bar.joined(separator: toto)

Triggering Examples

let foo = bar.joined(separator: "")
let foo = bar.filter(toto)
             .joined(separator: ""),
func foo() -> String {
  return ["1", "2"].joined(separator: "")
}
Clone this wiki locally