Dart 静态分析
原名:dart-run-static-analysis
运行 dart analyze,并在确认后处理可自动修复的 lint 和类型问题。
中文 Skills 技能说明
适合日常开发、代码审查或提交前质量检查。技能会区分真实错误、警告和风格建议,先展示分析结果再决定是否执行 dart fix;自动修复也可能改变代码,执行后应复查差异并运行相关测试。
上游能力依据
上游原始适用说明:Execute dart analyze to identify warnings and errors, and use dart fix --apply to automatically resolve mechanical lint issues. Use during development to ensure code quality and before committing changes.
上游 SKILL.md 主要章节(保留原文标题):
- Contents
- Analysis Configuration
- Diagnostic Suppression
- Workflow: Executing Static Analysis
- Workflow: Applying Automated Fixes
- Examples
- Comprehensive analysisoptions.yaml
- Inline Diagnostic Suppression
使用边界
先复现问题并固定测试范围,再生成或执行测试。测试通过只能证明已覆盖的场景,不能代替生产环境验收。
作者、翻译与许可证
- 原作者
- The Flutter Authors 与 flutter/agent-plugins contributors
- 中文翻译
- CEOFans翻译
- 许可证
- BSD-3-Clause
- 上游来源
- https://github.com/flutter/agent-plugins/tree/864cf8797b190ddb81e4875db6dd6bab89641f62/skills/dart-run-static-analysis
适用范围
平台:linux、macos、windows;标签:测试与质量、Dart 静态分析
安全提示
基础静态扫描不等于绝对安全。技能可能调用命令、浏览器、云服务或本地文件,请在最小权限环境中使用,高风险操作必须人工确认。
如发现侵权、许可证或安全问题,可在本页前台提交投诉,管理员复核后可立即下架。