Joined Default Parameter
Discouraged explicit usage of the default separator
- Identifier:
joined_default_parameter
- Enabled by default: No
- Supports autocorrection: Yes
- Kind: idiomatic
- Analyzer rule: No
- Minimum Swift compiler version: 5.0.0
- Default configuration:
Key Value severity 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: "")
}