dart-run-static-analysis

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

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/arslan9024/White-Caves --skill dart-run-static-analysis-arslan9024
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dart-run-static-analysis
Source: https://github.com/arslan9024/White-Caves/tree/main/.agents/skills/dart-run-static-analysis
Command: npx skills add https://github.com/arslan9024/White-Caves --skill dart-run-static-analysis-arslan9024

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 runs static analysis to surface warnings and errors, then applies automated fixes so code stays clean before commits. ## Core Features & Use Cases - Static Analysis Execution: Run dart analyze on a project or target directory to identify type errors, style violations, and potential runtime bugs, with optional --fatal-infos for strict CI gating. - Automated Fixes: Preview changes with dart fix --dry-run and apply them with dart fix --apply, then format results with dart format. - Analyzer Configuration: Set up analysis_options.yaml with strict type checks (strict-casts, strict-inference, strict-raw-types), linter rules, formatter settings, and diagnostic suppression patterns. - Use Case: Before committing a Flutter feature branch, run the analysis workflow to catch an implicit downcast error, apply automated fixes for deprecated API usages, and verify zero remaining diagnostics. ## Quick Start Run dart analyze on my project and apply any available automated fixes, then format the changed 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 check the entire project, or pass a target directory to limit scope. Add the `--fatal-infos` flag if info-level diagnostics should also fail the analysis, which is useful in CI pipelines.

How to automatically fix Dart lint issues?▼

Use `dart fix --dry-run` to preview proposed changes, then `dart fix --apply` to apply them. Only fixes for enabled linter rules are applied, so verify the relevant rules are active in analysis_options.yaml first, then run `dart format` on the results.

How do I configure strict type checking in Dart?▼

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

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

Add `// ignore: <diagnostic_code>` above or at the end of the offending line, or use `// ignore_for_file: <diagnostic_code>` at the top of a file. For generated code, exclude paths with glob patterns under the analyzer exclude node in analysis_options.yaml.

Why does dart fix not apply any changes?▼

dart fix only applies fixes whose corresponding linter rules are enabled in analysis_options.yaml. If no changes are proposed, check that the relevant rules are active and run a dry run to confirm what the tool detects before applying.