{"repo":"BlankSpruce/gersemi","free":true,"listed":false,"github":"https://github.com/BlankSpruce/gersemi","clone":"git clone https://github.com/BlankSpruce/gersemi.git","description":"A formatter to make your CMake code the real treasure","language":"CMake","stars":341,"topics":["cmake","formatter","codeformatter","cmakelists","specialized-formatter","cmake-language","formatting","formatters","cmake-format","pre-commit-hook"],"license":"MPL-2.0","category":"dev-tools","readme_excerpt":"gersemi A formatter to make your CMake code the real treasure. Installation You can install gersemi from PyPI: Usage pre-commit hook You can use gersemi with a pre-commit hook by adding the following to .pre-commit-config.yaml of your repository: Update rev to relevant version used in your repository. For more details refer to https://pre-commit.com/#using-the-latest-version-for-a-repository Extensions in pre-commit hook If you want to use extensions with pre-commit list them with additional dependencies . Example assuming that outcome configuration is in .gersemirc : .pre-commit-config.yaml : .gersemirc : Formatting [!IMPORTANT] Changes to code might be destructive and you should always have a backup (version control helps a lot). The key goals: - Formatter should \"just work\" and should have as little configuration as possible so that you don't have to worry about fine-tuning formatter to your needs - as long as you embrace the gersemi style of formatting, similarly as black or gofmt do their job. - Only valid CMake language code is considered - gersemi might be able to format some particular cases of invalid code but it's not guaranteed and it shouldn't be relied upon. - Only commands from CMake 3.0 onwards are supported and will be formatted properly - for instance exec program has been deprecated since CMake 3.0 so it won't be formatted. - Formatter can be informed about commands not supported out of the box: - through command definition (see: Let's make a deal) - through","default_branch":null,"files":null,"tree":[],"storefront":"/r/BlankSpruce","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/BlankSpruce/gersemi/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}