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
bdorfman-stripe opened this Issue Oct 6, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@bdorfman-stripe

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 label Oct 6, 2017

@marcelofabri

This comment has been minimized.

Show comment
Hide comment
@marcelofabri

marcelofabri Oct 6, 2017

Collaborator

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

// swiftlint:disable superfluous_disable_command trailing_newline
Collaborator

marcelofabri commented Oct 6, 2017

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

// swiftlint:disable superfluous_disable_command trailing_newline
@bdorfman-stripe

This comment has been minimized.

Show comment
Hide comment
@bdorfman-stripe

bdorfman-stripe Oct 6, 2017

Thanks for the super quick turnaround on this!

bdorfman-stripe commented Oct 6, 2017

Thanks for the super quick turnaround on this!

sirlantis added a commit to sirlantis/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