Files
AirCoding/AirPlan/docs/spec/AirPlanV2/commands/sdb.md
AirCoding ae44be31d5 chore: push all design docs, V2 plan specs, and current working state
Includes AirPlan design documents, AircOding-alpha1-plan, AirPlanV2,
AirPlan-ParaV2, AirPlan-Para V1 reference docs, and all working code
changes across packages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 17:12:29 +08:00

1.4 KiB
Executable File
Raw Blame History

description, argument-hint, allowed-tools
description argument-hint allowed-tools
AirPlan sdb mode - multi-language static analyzer (cppcheck/clang-tidy/clippy/go-vet/tsc/mypy) [analyze] [Read, Glob, Grep, Bash, Write, Edit]

/sdb

AirSDB 是多语言静态分析器。支持六种后端和 diff 模式。

支持的后端

后端 --backend 值 语言
Cppcheck cppcheck C/C++
Clang-Tidy clang-tidy C/C++
Clippy clippy Rust
go vet + staticcheck go-vet Go
tsc --noEmit tsc TypeScript
mypy + ruff mypy Python

子命令

执行静态分析

python scripts/airplan.py --mode sdb --project . --backend cppcheck --target ./src

参数:

  • --backend:分析后端(默认 cppcheck
  • --target:分析目标路径

返回每行一个 finding{file}:{line}: {severity}: {message}。最多显示 10 个。

diff 模式

两次扫描结果对比,高亮新增/消除的 finding

# 第一次扫描 → 保存基线
python scripts/airplan.py --mode sdb --project . --backend cppcheck --target ./src > baseline.txt
# 修改代码后第二次扫描 → Agent 读取两次结果对比 diff

集成路径

Dbg 取证Dbg 在 locate_root_cause 步骤可调 sdb 获取静态分析证据。

Do Worker 完成前Worker finish 前可调 sdb 验证代码质量。