-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Trigger superfluous_disable_command for custom_rules #4755
Conversation
04e2b94
to
05c948b
Compare
Generated by 🚫 Danger |
Damn - I was hoping I'd beat you to it, lol - https://github.com/realm/SwiftLint/compare/main...mildm8nnered:mildm8nnered-fix-superfluous_disable_command_for_custom_rules?expand=1 |
feel free to take over! idk when i'll have the time to continue/write tests for this |
So I came up with this, which I added to CustomRulesTests on my branch - feel free to steal it.
|
05c948b
to
bf38d33
Compare
Thanks @mildm8nnered! I've added this test and also another more complex one based on it - I think this is ready for review |
Is there anything we can help with to push this forward? |
f1531e6
to
1100c7c
Compare
With this commit I just get a violations for all my custom rules. For example with this code:
and this regex rule: use_stroke_colors:
name: "Use palette stroke colors instead of spectrum colors wherever possible."
regex: '(?:border|stroke)Color = (?:(?:UI|CG)?Color)?\.(?!stroke|always|pink)'
excluded: "Modules/something" I just see this warning all the time:
Lmk if you want a separate issue instead! Reverting this does fix it though |
huh, that's weird. I'll take a look later today and try to fix it forward. If I can't do it today/tomorrow I'll revert this PR. Thanks for letting us know! |
This reverts commit 7499896.
)" (realm#5339) This reverts commit 7499896.
)" (realm#5339) This reverts commit 7499896.
Fixes #4754
Need to write tests, but wanna make sure nothing breaks horribly first.