用户可通过该项目在 pre-commit 工作流中集成 clang-format,实现代码提交前的自动格式化,确保代码风格统一,提升团队协作效率。项目核心功能是提供 clang-format 的 pre-commit 镜像,简化配置流程。【此简介由AI生成】
clang-format mirror
Mirror of clang-format package for pre-commit.
For pre-commit: see https://github.com/pre-commit/pre-commit
For clang-format: see https://github.com/ssciwr/clang-format-wheel
Using clang-format with pre-commit
Add this to your .pre-commit-config.yaml:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: '' # Use the sha / tag you want to point at
hooks:
- id: clang-format