What problem does it solve?
C++ code in the Apache Doris BE and Cloud modules must conform to the project's clang-format rules, and CI fails when formatting deviates. This Skill automates detecting and fixing those formatting violations with the correct clang-format version.
Core Features & Use Cases
- Auto-fix formatting: Runs build-support/clang-format.sh to reformat all C++ files under be/src, be/test, cloud/src, and cloud/test in place.
- Check-only mode: Runs build-support/check-format.sh to output a diff of violations without modifying files, exiting non-zero on failures.
- Version enforcement: Ensures clang-format major version 16 is used, locating the correct binary via .vscode/settings.json, PATH, or custom_env.sh.
- Use Case: Before committing BE C++ changes, run the formatting script, review the diff with git diff, and commit only formatting-consistent code that passes CI.
Quick Start
Fix the C++ formatting in my BE and Cloud code changes using the project's clang-format script before I commit.