mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-03-30 21:53:28 +08:00
721 B
721 B
paths
| paths | |||||||
|---|---|---|---|---|---|---|---|
|
C++ 钩子
本文档基于 common/hooks.md 扩展了 C++ 相关内容。
构建钩子
在提交 C++ 更改前运行以下检查:
# Format check
clang-format --dry-run --Werror src/*.cpp src/*.hpp
# Static analysis
clang-tidy src/*.cpp -- -std=c++17
# Build
cmake --build build
# Tests
ctest --test-dir build --output-on-failure
推荐的 CI 流水线
- clang-format — 代码格式化检查
- clang-tidy — 静态分析
- cppcheck — 补充分析
- cmake build — 编译
- ctest — 使用清理器执行测试