dart-run-static-analysis

Runs dart analyze to detect diagnostics and applies automated fixes with dart fix.

1|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/sohampawar1866/zeromile-go --skill dart-run-static-analysis-sohampawar1866
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dart-run-static-analysis
Source: https://github.com/sohampawar1866/zeromile-go/tree/main/.agents/skills/dart-run-static-analysis
Command: npx skills add https://github.com/sohampawar1866/zeromile-go --skill dart-run-static-analysis-sohampawar1866

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Dart projects accumulate lint warnings, type errors, and outdated API usages that are tedious to find and fix manually. This Skill runs static analysis and applies automated fixes so code stays clean before commits. ## Core Features & Use Cases - Static Analysis Execution: Run dart analyze via CLI or MCP tools to surface errors, warnings, and lint violations, with optional --fatal-infos for strict CI gating. - Automated Fixes: Preview changes with dart fix --dry-run, then apply mechanical fixes and Dart 3 migrations with dart fix --apply, followed by formatting. - Analyzer Configuration: Configure analysis_options.yaml with strict type checks, linter rules, formatter settings, plugins, and diagnostic suppression patterns. - Use Case: Before committing a Flutter feature branch, run the analysis workflow to catch strict-cast violations, apply automated fixes for deprecated APIs, and verify a clean diagnostic report. ## Quick Start Run dart analyze on my project and apply any automated fixes, then show me the remaining diagnostics.

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 project root, optionally targeting a specific directory. Ensure an analysis_options.yaml file exists first, and add the --fatal-infos flag if info-level issues should fail the check.

How to automatically fix Dart lint warnings?

Use dart fix --dry-run to preview proposed changes, then dart fix --apply to apply them. Follow up with dart format and re-run dart analyze to confirm all diagnostics are resolved.

How do I suppress a lint warning in Dart code?

Add // ignore: <diagnostic_code> above or at the end of the offending line, or // ignore_for_file: <diagnostic_code> at the top of the file. For entire directories, use the analyzer exclude node in analysis_options.yaml.

What strict type checks should I enable in analysis_options.yaml?

Enable strict-casts, strict-inference, and strict-raw-types under the analyzer language node. These prevent implicit downcasts and dynamic type inferences that hide bugs.

Why does dart fix not fix some lint issues?

dart fix only applies automated fixes for rules that have quick-fix implementations, and the corresponding linter rule must be enabled in analysis_options.yaml. Other diagnostics require manual code changes.