-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Linter rules such as enable_null_safety
don't show diagnostic anymore
#59869
Comments
I also feel like these rules could show up as deprecated on auto-complete in these cases or something similar. WDYT @bwilkerson and @DanTup? I'm unsure if that is possible, to show deprecation only when dependencies are above a certain version. |
It looks like there is some existing code that handles removed lints: sdk/pkg/analyzer/lib/src/lint/options_rule_validator.dart Lines 114 to 124 in 31a354f
And that lint is marked removed since 3.0:
So perhaps there is a bug/regression here somewhere (I'm assuming by the word "anymore" in the title, that this worked in the past but doesn't now?). |
Yes, there should be a diagnostic displayed in the As for code completion, the intention was to not display removed lints at all (rather than marking them as deprecated). If removed lints are being suggested in code completion then that's also a bug (and might have a different cause). |
That's what I assumed. I'm not 100% sure. I've not tested with other versions of the SDK yet but that is what I would expect.
I'll open a second issue about it then. Thanks. |
I've just tested both with the latest master. The auto-completion (for removed lints) is not happening on master (so I won't open an issue on it) but there is no diagnostic on the lints when adding them manually. |
My
pubspec.yaml
:I'm creating a new flutter project with the latest stable.
I saw the following doesn't have any warnings:
I'd expect this to give a warning as is not needed. This is on the lint docs:
Some other rules such as
always_require_non_null_named_parameters
are also not showing any diagnostics.Tested by changing my
pubspec.yaml
to:And the diagnostic for
always_require_non_null_named_parameters
did show up. So I guess something is not working as intended.The text was updated successfully, but these errors were encountered: