A pre-commit hook for cmake-format.
By default, this hook runs on files beginning with CMakeLists
and files ending with .cmake
(all case sensitive).
It uses the default configurations, unless you have a .cmake-format{.py,.yaml,.json}
file, as is usual with cmake-format
.
You can also specift formatting optinos with args:
in your .pre-commit-config.yaml
.
Here's the most basic way to add a hook to cmake-format
to your .pre-commit-config.yaml
:
- repo: https://github.com/iconmaster5326/cmake-format-pre-commit-hook
rev: master
hooks:
- id: cmake-format