Files
sdk/pkg/linter/example
Chloe Stefantsova 4b9ed5eb4f [lint] Add lint for using null-aware elements
The lint suggests rewriting explicit null-checks, such as:

* [if (x != null) x]
* {if (x case var key?) key: "value"}

The suggested rewrite is to use the null-aware marker '?':

* [?x]
* {?x: "value"}

Change-Id: If37d096755fee14b3d9dee0f730d3302176ad0f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411685
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2025-02-25 09:10:58 -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.