-
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
Deprecate avoid_null_checks_in_equality_operators
#59514
Labels
analyzer-linter
Issues with the analyzer's support for the linter package
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
linter-set-recommended
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
Comments
srawlins
added
type-enhancement
A request for a change that isn't a bug
P3
A lower priority bug or feature request
labels
Aug 14, 2024
I agree that this should be deprecated. The first step is probably to get it removed from the 'recommended' set. |
Filed a request at dart-lang/lints#200. |
Removed from the lints package in the 5.0.0 release. |
copybara-service bot
referenced
this issue
Oct 14, 2024
Fixes https://github.com/dart-lang/linter/issues/5063 Change-Id: I85a3c9e1a568d55ce1e21d0f1fee4ce1c83292f4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389300 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Phil Quitslund <[email protected]>
copybara-service bot
referenced
this issue
Oct 15, 2024
… rule" This reverts commit 5572900. Reason for revert: broke the assorted_layout_widgets customer tests. Original change's description: > lint rule: Remove the avoid_null_checks_in_equality_operators rule > > Fixes https://github.com/dart-lang/linter/issues/5063 > > Change-Id: I85a3c9e1a568d55ce1e21d0f1fee4ce1c83292f4 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/389300 > Commit-Queue: Samuel Rawlins <[email protected]> > Reviewed-by: Phil Quitslund <[email protected]> Change-Id: I3ff1448088f4d5163dc66f6e181a97302c4d137a No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390300 Bot-Commit: Rubber Stamper <[email protected]> Reviewed-by: Phil Quitslund <[email protected]> Commit-Queue: Phil Quitslund <[email protected]> Auto-Submit: Samuel Rawlins <[email protected]>
8 tasks
srawlins
referenced
this issue
in srawlins/dart-rfb
Oct 29, 2024
Each of these are going to be removed soon. * avoid_null_checks_in_equality_operators * unsafe_html Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
This was referenced Oct 29, 2024
srawlins
referenced
this issue
in srawlins/flutter-rfb
Oct 29, 2024
Each of these are going to be removed soon. * avoid_null_checks_in_equality_operators * unsafe_html Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
srawlins
referenced
this issue
in srawlins/flutter_portal
Oct 29, 2024
Each of these are going to be removed soon. * avoid_null_checks_in_equality_operators * unsafe_html Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
srawlins
referenced
this issue
in flutter/tests
Oct 29, 2024
Work towards https://github.com/dart-lang/linter/issues/5063 This repo refers to the `avoid_null_checks_in_equality_operators` lint rule, which is being removed as per https://github.com/dart-lang/linter/issues/5063. This repo is also being migrated, as I understand it. I suggest we disable for now, and can remove the `avoid_null_checks_in_equality_operators` enablement after the migration, and re-enable the tests then.
8 tasks
srawlins
referenced
this issue
in srawlins/flutter-packages
Oct 30, 2024
Each of these are going to be removed soon. * avoid_null_checks_in_equality_operators * unsafe_html Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
11 tasks
auto-submit bot
referenced
this issue
in flutter/tests
Oct 30, 2024
Work towards https://github.com/dart-lang/linter/issues/5063 This repo refers to the `avoid_null_checks_in_equality_operators` lint rule, which is being removed as per https://github.com/dart-lang/linter/issues/5063. This repo is also being migrated, as I understand it. Let's remove it from the customer tests registry.
auto-submit bot
referenced
this issue
in flutter/packages
Oct 30, 2024
Each of these are going to be removed soon. * avoid_null_checks_in_equality_operators * unsafe_html Work towards dart-lang/linter#5063 and dart-lang/linter#5001
srawlins
referenced
this issue
in flutter/devtools
Oct 31, 2024
Each of these are going to be removed soon. * avoid_null_checks_in_equality_operators * unsafe_html Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
mossmana
referenced
this issue
in mossmana/devtools
Oct 31, 2024
Each of these are going to be removed soon. * avoid_null_checks_in_equality_operators * unsafe_html Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
auto-submit bot
referenced
this issue
in flutter/cocoon
Nov 1, 2024
Each of these three are going to be removed soon. * avoid_null_checks_in_equality_operators * package_api_docs * unsafe_html Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
srawlins
referenced
this issue
in flutter/tests
Nov 6, 2024
ded610ea7563cff50efa6efaeeb14d69848382c0 contains flutter/cocoon#3991 which unblocks https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
8 tasks
srawlins
referenced
this issue
in flutter/tests
Nov 6, 2024
5584f9bbd5f7dcbc46e3293e395978466c83a453 contains fzyzcjy/flutter_portal#117, which unblocks https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
8 tasks
auto-submit bot
referenced
this issue
in flutter/tests
Nov 6, 2024
ded610ea7563cff50efa6efaeeb14d69848382c0 contains flutter/cocoon#3991 which unblocks https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
auto-submit bot
referenced
this issue
in flutter/tests
Nov 6, 2024
5584f9bbd5f7dcbc46e3293e395978466c83a453 contains fzyzcjy/flutter_portal#117, which unblocks https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
8 tasks
auto-submit bot
referenced
this issue
in flutter/tests
Nov 7, 2024
Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001 There are open PRs for blocked Dart SDK work in these two repos: * Goddchen/dart-rfb#26 * Goddchen/flutter-rfb#24 @Goddchen has not responded to these in 72 hours. This change disables the tests. The tests can be re-enabled when those PRs have been merged, and the subsequent relevant commits in this repo bumped.
Goddchen
referenced
this issue
in Goddchen/dart-rfb
Nov 13, 2024
Each of these are going to be removed soon. * avoid_null_checks_in_equality_operators * unsafe_html Work towards https://github.com/dart-lang/linter/issues/5063 and https://github.com/dart-lang/linter/issues/5001
devoncarew
added
analyzer-linter
Issues with the analyzer's support for the linter package
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
labels
Nov 20, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
analyzer-linter
Issues with the analyzer's support for the linter package
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
linter-set-recommended
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
We introduced a new Warning called
NON_NULLABLE_EQUALS_PARAMETER
a few releases ago. It warns when the parameter of anoperator ==
override has a nullable type:I didn't realize it at the time, but that new warning, plus null safety, basically replace the
avoid_null_checks_in_equality_operators
lint rule. This rule reports doing any null-check work on a nullable parameter of anoperator ==
override.As I found out when I migrated the tests from the legacy framework, the rule is a bit non-sensical now because of the redundancy. Every test case either has a
WarningCode.NON_NULLABLE_EQUALS_PARAMETER
, if it features a nullable parameter, or it features another warning likeWarningCode.UNNECESSARY_NULL_COMPARISON_TRUE
orStaticWarningCode.INVALID_NULL_AWARE_OPERATOR
, if the parameter is non-nullable and is compared tonull
.The text was updated successfully, but these errors were encountered: