Static analysis

From LeoKemp223/embed-ai-tool · View interactive version

Static analysis is an AI agent skill from the GitHub repository LeoKemp223/embed-ai-tool. 当需要对嵌入式 C/C++ 代码运行 cppcheck、clang-tidy 或 GCC analyzer 静态分析,或进行 MISRA-C 合规检查时使用。

How to use this skill

Skill file

静态分析

适用场景

必要输入

自动探测

执行步骤

  1. 先阅读 references/usage.md,确认本次使用哪个分析工具。
  2. 若不确定工具是否可用,先运行 scripts/static_analyzer.py 的 --detect 模式。
  3. 使用 --cppcheck --source <dir> 运行 cppcheck 分析。
  4. 使用 --clang-tidy --source <dir> 运行 clang-tidy 分析。
  5. 使用 --gcc-analyzer --source <files> 运行 GCC analyzer 分析。
  6. 需要 MISRA 合规时,添加 --misra 参数启用 cppcheck MISRA addon。
  7. 阅读 references/misra-quick-ref.md 了解常见 MISRA 违规。

失败分流

平台说明

输出约定

交接关系

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.