Files
sdk/pkg/linter/example
Sam Rawlins 04753f6565 analyzer: Deprecate the avoid_null_checks_in_equality_operators lint rule
Work towards https://github.com/dart-lang/sdk/issues/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 <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2025-12-12 19:06:29 -08:00
..

Examples

Some example analysis options files.

  • all.yaml - auto-generated options enabling all lints.

For more on lint rule sets see the analyzer docs on customizing static analysis.

Official Dart lint rules are maintained in package:lints.

Flutter team rules are maintained in package:flutter_lints.