dart-run-static-analysis

Run dart analyze to detect diagnostics and apply automated fixes with dart fix.

1|Updated Aug 31, 2026
One-click install
npx skills add https://github.com/nguyenhungtran18/skill-and-tool-tracker --skill dart-run-static-analysis-nguyenhungtran18
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dart-run-static-analysis
Source: https://github.com/nguyenhungtran18/skill-and-tool-tracker/tree/main/skills/dart-run-static-analysis
Command: npx skills add https://github.com/nguyenhungtran18/skill-and-tool-tracker --skill dart-run-static-analysis-nguyenhungtran18

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Dart and Flutter projects accumulate lint violations, type errors, and outdated API usages that are tedious to find and fix manually. This Skill standardizes static analysis configuration and automates the detection and resolution of mechanical code issues before commits. ## Core Features & Use Cases - Static Analysis Execution: Run dart analyze against a target directory to surface type errors, warnings, and style violations, with optional --fatal-infos enforcement. - Automated Fixes: Preview changes with dart fix --dry-run and apply them with dart fix --apply, then format results with dart format. - Analyzer Configuration: Configure analysis_options.yaml with strict type checks (strict-casts, strict-inference, strict-raw-types), linter rules, formatter settings, and plugin support. - Diagnostic Suppression: Suppress false positives at file, line, or pubspec level using ignore and ignore_for_file comments or glob-based exclusions. - Use Case: Before committing a Flutter feature branch, run the analyzer to catch implicit downcasts, preview automated fixes for deprecated APIs, apply them, and re-verify a clean diagnostic report. ## Quick Start Run dart analyze on my project, apply safe automated fixes with dart fix, and format the modified files.

Frequently Asked Questions about dart-run-static-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run static analysis on a Dart project?▼

Run dart analyze from the package root to report errors, warnings, and lints across the project. Ensure an analysis_options.yaml file exists first, and add the --fatal-infos flag if info-level diagnostics should fail the check.

How to automatically fix Dart lint issues?▼

Use dart fix --dry-run to preview proposed automated fixes, then dart fix --apply to apply them. Fixes only cover diagnostics whose corresponding linter rules are enabled in analysis_options.yaml, so verify rule configuration first.

How do I enable strict type checking in Dart analyzer?▼

Enable strict type checks under the analyzer language node in analysis_options.yaml by setting strict-casts, strict-inference, and strict-raw-types to true. This prevents implicit downcasts and dynamic type inferences in your codebase.

How do I suppress a Dart lint warning for one line or file?▼

Add // ignore: diagnostic_code above or beside the offending line, or // ignore_for_file: diagnostic_code at the top of the file. For generated files, exclude them globally with glob patterns under the analyzer exclude node.

Can dart fix handle Dart 3 migrations?▼

Yes, dart fix applies quick fixes and migration changes such as Dart 3 updates. Run a dry run first to review proposed changes, apply them, format the code with dart format, and re-run dart analyze to confirm resolution.