format — In-Place Formatting
metis run --format runs clang-format in-place on your files without running the full check suite.
# format staged files $ metis run --format # format all tracked files $ metis run --format --all-files # format specific files $ metis run --format src/main.cpp include/foo.hpp # dry-run (list files, don't rewrite) $ metis run --format --dry-run --all-files
Requirements
clang-formatmust be installed and available inPATH- a
.clang-formatconfig file must exist (generated viametis init)
Format in the Pre-Commit Hook
The generated pre-commit hook does not support --format directly. To auto-format on every commit, edit .git/hooks/pre-commit to run metis run --format instead of the default check mode.