-
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
Warnings for deprecated rules that are implicitly enabled using the all
rule
#4989
Comments
While they are deprecated they are still valid rules. So I would expect them to be enabled by the If you don't want the rules to be enabled, explicitly disable them. The warning appears no matter how the rules were enabled. If you like the rules, you enable them but you have to live with the warning. That's independent from the |
I agree that deprecated rules should remain enabled by |
Well, with |
I actually hadn't thought of that. What type of use/users are you thinking of? |
|
I don't think it would be too outrageous to have a command line argument that suppressed the deprecated rule warnings though. In a private experimental branch I've got an implementation of a configuration "wizard" for SwiftLint, and there I marked all the deprecated rules with a A similar mechanism could be extended to support a command line argument to suppress the deprecation warnings ... |
I agree that deprecated rules still may be useful and I never asked to stop enabling them! |
what's the reason behind deprecating 'unused_capture_list'? Swift compiler doesn't seem to be reporting about that, so what's the catch? |
Which version of the Swift compiler are you using and on which example? Compiling func f(x: Int) {
{ [x] in }()
} prints out main.swift:2:8: warning: capture 'x' was never used
{ [x] in }()
^ which I'm using Swift 5.10. But as the rule got deprecated 18 months ago already, I assume that at least 5.8 should be complaining too. |
New Issue Checklist
Describe the bug
SwiftLint gives warnings for deprecated rules that are implicitly enabled using the
all
rule :Environment
The text was updated successfully, but these errors were encountered: