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

Unable to disable superfluous_disable_command #1890

Closed
2 tasks done
bdorfman-stripe opened this issue Oct 6, 2017 · 2 comments
Closed
2 tasks done

Unable to disable superfluous_disable_command #1890

bdorfman-stripe opened this issue Oct 6, 2017 · 2 comments
Labels
bug Unexpected and reproducible misbehavior.

Comments

@bdorfman-stripe
Copy link

bdorfman-stripe commented Oct 6, 2017

New Issue Checklist

Bug Report

Adding // swiftlint:disable superfluous_disable_command to a file does not seem to actually disable the warning.

Receive this error in the file I added the disable comment to

error: Superfluous Disable Command Violation: SwiftLint rule 'identifier_name' did not trigger a violation in the disabled region. Please remove the disable command. (superfluous_disable_command)
  • SwiftLint version (run swiftlint version to be sure)?
    0.23.0

  • Installation method used (Homebrew, CocoaPods, building from source, etc)?
    Homebrew

  • Are you using nested configurations?
    No

  • Which Xcode version are you using (check xcode-select -p)?
    9.0

  • Do you have a sample that shows the issue? Run echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
    to quickly test if your example is really demonstrating the issue. If your example is more
    complex, you can use swiftlint lint --path [file here] --no-cache --enable-all-rules.

// This triggers a superfluous disable command warning for trailing newlines
// (There is actually a newline at the end here that isn't rendered when shown as Markdown)
// swiftlint:disable superfluous_disable_command
// swiftlint:disable trailing_newline
@marcelofabri marcelofabri added the bug Unexpected and reproducible misbehavior. label Oct 6, 2017
@marcelofabri
Copy link
Collaborator

It looks like disabling them at the same time works as expected:

// swiftlint:disable superfluous_disable_command trailing_newline

@bdorfman-stripe
Copy link
Author

Thanks for the super quick turnaround on this!

mrcljx pushed a commit to mrcljx/SwiftLint that referenced this issue Oct 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

No branches or pull requests

2 participants