Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

superfluous_disable_command not triggering for custom rule #4754

Open
2 tasks done
marcelofabri opened this issue Feb 7, 2023 · 2 comments · Fixed by #4755
Open
2 tasks done

superfluous_disable_command not triggering for custom rule #4754

marcelofabri opened this issue Feb 7, 2023 · 2 comments · Fixed by #4755
Labels
bug Unexpected and reproducible misbehavior.

Comments

@marcelofabri
Copy link
Collaborator

marcelofabri commented Feb 7, 2023

New Issue Checklist

Describe the bug

superfluous_disable_command is not triggering for custom rules. I don't know if this has always been the behavior or if it's a recent regression.

Complete output when running SwiftLint, including the stack trace and command used
$ swiftlint file.swift           
Linting Swift files at paths file.swift
Linting 'file.swift' (1/1)
/Users/marcelo.fabri/SwiftLint/test/file.swift:1:5: warning: forbidden Violation: This is forbidden (forbidden)
Done linting! Found 1 violation, 0 serious in 1 file.

Environment

  • SwiftLint version (run swiftlint version to be sure)? 0.50.3
  • Installation method used (Homebrew, CocoaPods, building from source, etc)? brew
  • Paste your configuration file:
custom_rules:
  forbidden:
    regex: 'FORBIDDEN'
    message: "This is forbidden"
    severity: warning
  • Are you using nested configurations? No
  • Which Xcode version are you using (check xcodebuild -version)? 14.0.1
  • 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.
let FORBIDDEN = 1
// swiftlint:disable:next forbidden
let ALLOWED = 2
@marcelofabri
Copy link
Collaborator Author

reopening because the PR that fixed it got reverted

@marcelofabri marcelofabri reopened this Nov 9, 2023
u-abyss pushed a commit to u-abyss/SwiftLint that referenced this issue Dec 16, 2023
MartijnAmbagtsheer pushed a commit to MartijnAmbagtsheer/SwiftLint that referenced this issue Dec 20, 2023
@mildm8nnered
Copy link
Collaborator

So I picked this up again the other day, and I think I can see where we were going wrong before ... should have a PR soon

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants