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

SwitchCaseOnNewline triggers on enums #878

Closed
marcelofabri opened this issue Nov 15, 2016 · 1 comment
Closed

SwitchCaseOnNewline triggers on enums #878

marcelofabri opened this issue Nov 15, 2016 · 1 comment

Comments

@marcelofabri
Copy link
Collaborator

I totally forgot about enums when implementing SwitchCaseOnNewlineRule.

It seems that only enums with associated values are triggering this rule:

// doesn't trigger
enum Enviromnent {
    case development
    case production
}

// triggers
enum Environment {
    case development(url: URL)
    case production(url: URL)
}
@jpsim
Copy link
Collaborator

jpsim commented Nov 25, 2016

Fixed in #877.

@jpsim jpsim closed this as completed Nov 25, 2016
norio-nomura added a commit that referenced this issue Nov 30, 2016
* commit 'e65437cd7a7a1e97f68ddb62d572952d74fa3876':
  Fixing #878
  `switch_case_on_newline` should ignore trailing comments

# Conflicts:
#	Source/SwiftLintFramework/Rules/SwitchCaseOnNewlineRule.swift
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

2 participants