Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing comma rule with mandatory comma should only trigger on multiline arrays #917

Closed
jkooker opened this issue Dec 1, 2016 · 2 comments

Comments

@jkooker
Copy link

jkooker commented Dec 1, 2016

The new trailing comma rule is very nice, and I want to turn it on for my multiline arrays. But that's triggering errors in my single-line arrays. It seems to me that the rule should only apply to multiline arrays.

In other words, can we make the following valid?

let x = [
    1,
    2,
    3,
]

let y = [1]

For .swiftlint.yml configuration:

trailing_comma:
    mandatory_comma: true
@marcelofabri
Copy link
Collaborator

marcelofabri commented Dec 1, 2016

This is duplicate of #910 and was fixed in #912.

Please reopen if you still have this issue with the current (master) version.

@jpsim
Copy link
Collaborator

jpsim commented Dec 1, 2016

I've cut a new release which includes this fix: 0.13.2: Light Cycle. Homebrew PR: Homebrew/homebrew-core#7449

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants