# cmake-format

[**cmake-format**](https://github.com/cheshirekow/cmake_format) is a formatter for C, C++.

You can enable the cmake-format formatter with:

```shell
trunk check enable cmake-format
```

## Auto Enabling

cmake-format will be auto-enabled if any of its config files are present: *`.cmake-format.json`, `.cmake-format.py`, `.cmake-format.yaml`*.

## Settings

cmake-format supports the following config files:

* `.cmake-format.json`
* `.cmake-format.py`
* `.cmake-format.yaml`
* `cmake-format.json`
* `cmake-format.py`
* `cmake-format.yaml`

You can move these files to `.trunk/configs` and `trunk check` will still find them. See [Moving Linters](https://docs.trunk.io/code-quality/overview/configure-linters#moving-linters) for more info.

## Links

* [cmake-format site](https://github.com/cheshirekow/cmake_format)
* cmake-format Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/cmake-format)
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
