joined_default_parameter - ApplebaumIan/BitbucketAPI GitHub Wiki

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: "")
}