Commit 04753f6
analyzer: Deprecate the avoid_null_checks_in_equality_operators lint rule
Work towards #59514
We introduced a new Warning called NON_NULLABLE_EQUALS_PARAMETER a few releases ago. It warns when the parameter of an `operator ==` override has a nullable type:
> The parameter type of '==' operators should be non-nullable.
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 an `operator ==` override.
Change-Id: Ibd8139cd5804a9ccb6cc07d2187c9305a336c7cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/467922
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Samuel Rawlins <[email protected]>1 parent 6c0ae60 commit 04753f6
File tree
4 files changed
+7
-1
lines changed- pkg/linter
- example
- lib/src/rules
4 files changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1728 | 1728 | | |
1729 | 1729 | | |
1730 | 1730 | | |
| 1731 | + | |
1731 | 1732 | | |
1732 | 1733 | | |
1733 | 1734 | | |
| |||
0 commit comments