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

switch_case_on_newline triggered incorrectly on selectors #1263

Closed
hashier opened this issue Jan 30, 2017 · 6 comments
Closed

switch_case_on_newline triggered incorrectly on selectors #1263

hashier opened this issue Jan 30, 2017 · 6 comments
Labels
duplicate Issues that already exist in other terms. repro-needed Issues that cannot be reproduced or miss proper descriptive examples.

Comments

@hashier
Copy link

hashier commented Jan 30, 2017

In the given example below switch_case_on_newline is incorrectly triggered

override func tableView(_ tableView: UITableView, performAction action: Selector, forRowAt indexPath: IndexPath, withSender sender: Any?) {
    switch action {
    case #selector(copy(_:)):
        <code>
    default:
       break
    }
}
@marcelofabri
Copy link
Collaborator

I couldn't reproduce it with 0.16.1. This was indeed a bug on a previous version (#1020), but the fix (#1023) landed on 0.15.

Can you confirm you're using the latest version and that this snippet does trigger? Thanks!

@marcelofabri marcelofabri added the repro-needed Issues that cannot be reproduced or miss proper descriptive examples. label Jan 30, 2017
@hashier
Copy link
Author

hashier commented Jan 30, 2017

$ brew info swiftlint
swiftlint: stable 0.16.1 (bottled), HEAD
Tool to enforce Swift style and conventions
https://github.com/realm/SwiftLint
/usr/local/Cellar/swiftlint/HEAD-1b82909 (34 files, 9.9M) *
  Built from source on 2016-11-12 at 18:08:41
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/swiftlint.rb
==> Requirements
Build: git ✔
Required: xcode ✔

screen shot 2017-01-30 at 14 37 58

@hashier
Copy link
Author

hashier commented Jan 30, 2017

Is there a way to ask swiftlint directly for the version?
case invalidResponse([String: AnyObject]) seems to broken as well... I will try to use the swiftlint from pods

@marcelofabri
Copy link
Collaborator

Is there a way to ask swiftlint directly for the version?

I think swiftlint version is what you want.

You can try to run from the terminal as well to be sure that you're using the right binary.

@hashier
Copy link
Author

hashier commented Jan 30, 2017

Using the pods version works.
brew uninstall -f swiftlint brew install swiftlint works now as well...

Thanks

@hashier hashier closed this as completed Jan 30, 2017
@marcelofabri
Copy link
Collaborator

Thanks for the feedback, @hashier!

@marcelofabri marcelofabri added the duplicate Issues that already exist in other terms. label Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate Issues that already exist in other terms. repro-needed Issues that cannot be reproduced or miss proper descriptive examples.
Projects
None yet
Development

No branches or pull requests

2 participants