https://github.com/iconmaster5326/cmake-format-pre-commit-hook
A pre-commit hook for cmake-format.
https://github.com/iconmaster5326/cmake-format-pre-commit-hook
cmake formatter pre-commit pre-commit-hook
Last synced: 10 months ago
JSON representation
A pre-commit hook for cmake-format.
- Host: GitHub
- URL: https://github.com/iconmaster5326/cmake-format-pre-commit-hook
- Owner: iconmaster5326
- License: mit
- Created: 2019-09-27T13:38:44.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-19T18:31:46.000Z (about 1 year ago)
- Last Synced: 2025-03-28T05:28:18.398Z (11 months ago)
- Topics: cmake, formatter, pre-commit, pre-commit-hook
- Language: Python
- Size: 13.7 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cmake-format-pre-commit-hook
A [pre-commit](https://pypi.org/project/pre-commit/) hook for [cmake-format](https://pypi.org/project/cmake-format/).
# Usage
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`.
# Example
Here's the most basic way to add a hook to `cmake-format` to your `.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/iconmaster5326/cmake-format-pre-commit-hook
rev: master
hooks:
- id: cmake-format
```