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 incorrectly flags [SomeType]() #911

Closed
ZevEisenberg opened this issue Nov 30, 2016 · 2 comments
Closed

trailing_comma incorrectly flags [SomeType]() #911

ZevEisenberg opened this issue Nov 30, 2016 · 2 comments
Labels

Comments

@ZevEisenberg
Copy link
Contributor

This code:

var imageViews = [UIImageView]()

is causing a warning when I have this in my SwiftLint configuration:

trailing_comma:
  mandatory_comma: true

This is with SwiftLint 0.13.1.

@jpsim
Copy link
Collaborator

jpsim commented Nov 30, 2016

Let's try to minimize the false positives and make sure the following doesn't trigger with mandatory_comma:

[Void]()
[(Void, Void)]()

Perhaps we can kill two birds with one stone by not reporting violations for single-line collections as reported in #910.

@jpsim
Copy link
Collaborator

jpsim commented Dec 1, 2016

Fixed by @marcelofabri in #912.

@jpsim jpsim closed this as completed Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants