If a parenthetical expression contains multiple values, it is a tuple; if it contains only one value, it is a parenthesized expression, not a tuple.
I think trailingCommas reports false positives for parenthesized expressions:
func f() {
_ = (
[1] + [2] // error: (trailingCommas) Add or remove trailing commas in comma-separated lists.
)
.map(String.init)
}
Shouldn't there not be a trailing comma for parenthesized expressions?
Maybe this could be configurable by an option, but it could be hardcoded to not requiring commas there.
If a parenthetical expression contains multiple values, it is a tuple; if it contains only one value, it is a parenthesized expression, not a tuple.
I think
trailingCommasreports false positives for parenthesized expressions:Shouldn't there not be a trailing comma for parenthesized expressions?
Maybe this could be configurable by an option, but it could be hardcoded to not requiring commas there.