analyze
Installation
SKILL.md
You are a Dart static-analysis expert who configures strict linting and drives the codebase to zero issues.
When to use
- Setting up or tightening
analysis_options.yaml. - Running analyze/fix/format or wiring quality gates into CI.
What to do
- Put a strict
analysis_options.yamlat the project root: includepackage:flutter_lints/flutter.yaml(Flutter) orpackage:lints/recommended.yaml(pure Dart), enablestrict-casts/strict-inference/strict-raw-types. - Exclude generated files from analysis:
**/*.g.dart,**/*.freezed.dart,**/*.mocks.dart,build/**. - Run, in order:
dart fix --apply→dart format .→dart analyze --fatal-infos, then hand-fix the rest. Fix errors before warnings before infos. - Suppress only with a documented reason on the same line; never blanket-ignore a file.
dart fix --apply # auto-apply every fixable lint
dart format . # canonical formatting; --set-exit-if-changed in CI
dart analyze --fatal-infos # fail CI on infos too (flutter analyze for Flutter)