fleetlint Policy for a fleet of repositories
v0.3
Getting started

lint/flutter-config

Dart analysis is strict

Severitywarning
Tiersall
Stacksflutter
Scopeeach
Kindexpr
Sourcelibrary v0.0.0-20261011205826-ecb4e9b3ffd4
Selected byfleetlint-recommended@0.1.0

Requirement

analysis_options.yaml enables strict-casts, strict-inference and strict-raw-types and does not disable use_build_context_synchronously or unawaited_futures.

Why

Those three switches are what turn Dart’s analyzer from advisory into a type checker.

Check

file("analysis_options.yaml") && yaml("analysis_options.yaml") != null && has(yaml("analysis_options.yaml").analyzer) && has(yaml("analysis_options.yaml").analyzer.language) && "strict-casts" in yaml("analysis_options.yaml").analyzer.language && yaml("analysis_options.yaml").analyzer.language["strict-casts"] == true

Fix

Set analyzer.language strict-* to true and include very_good_analysis.

Agent instruction: Edit analysis_options.yaml: include very_good_analysis, set analyzer.language strict-casts/strict-inference/strict-raw-types true, remove rules that disable use_build_context_synchronously or unawaited_futures.

fleetlint fix can apply this rule’s fix automatically (2 action(s)).


Generated by fleetlint docs from catalog v0.0.0-20261011205826-ecb4e9b3ffd4.