dart-run-static-analysis

Run dart analyze and dart fix to resolve lint issues in Dart projects.

428|29|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/dart-lang/skills --skill dart-run-static-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dart-run-static-analysis
Source: https://github.com/dart-lang/skills/tree/main/skills/dart-run-static-analysis
Command: npx skills add https://github.com/dart-lang/skills --skill dart-run-static-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify and fix lint and analyzer issues in a Dart project to improve code quality and reliability.

Core Features & Use Cases

  • Automated analysis: run dart analyze to surface warnings and errors across the project.
  • Automated fixes: apply mechanical fixes with dart fix --apply to clean up issues before commits.
  • Use Case: Prepare a pull request by ensuring all analyzer warnings are resolved and code conforms to the configured lint rules.

Quick Start

Run dart analyze on your project, then apply fixes with dart fix --apply to clear mechanical issues.

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 automate Dart static analysis and apply fixes before committing?

Automate Dart static analysis by running `dart analyze` to surface issues, then apply mechanical fixes with `dart fix --apply` to clean up the codebase before commits. This ensures code quality and consistency across your Dart project.

What is the best way to resolve analyzer warnings in a Dart project?

The best way to resolve analyzer warnings is to run `dart analyze` to identify lint issues across your project, followed by `dart fix --apply` to automatically clean up mechanical violations against configured lint rules.

How does dart fix --apply work with strict lint rules in analysis_options.yaml?

`dart fix --apply` reads your `analysis_options.yaml` configuration to apply mechanical fixes that align your code with strict lint rules, resolving analyzer warnings automatically without manual code edits.

Can I use this to ensure my pull request passes Dart code quality checks?

Yes, you can prepare a pull request by running automated analysis to ensure all analyzer warnings are resolved and the code conforms to configured lint rules before integration.

Why should I run dart analyze before applying dart fix in my workflow?

Running `dart analyze` first surfaces all warnings and errors across the project, allowing you to identify code quality issues before `dart fix --apply` attempts to apply mechanical fixes to clean up the codebase.

Do I need any dependencies to run automated Dart lint analysis?

No external dependencies are required to run automated Dart lint analysis; the skill relies solely on the standard Dart SDK tools `dart analyze` and `dart fix --apply` to identify and resolve analyzer issues.