Skip to content

Add cmake function to configure pre-commit hooks

Alexander Lohnau requested to merge work/clang_format_hook into master

By calling this function a pre-commit hook will be automatically created. In case the user tries to commit unformatted changes an error will be displayed.

This is based on @aacid's work on okular, which is why he got full credit for the script :)

We discussed the clang-format topic on the #plasma meeting and a pre-commit hook was seen as good way to enforce the formatting, because gitlab-ci integration is still experimental. Any by having this automatically added we can be sure that contributors do not overlook the section in the README about formatting.

@nicolasfella @davidedmundson @cullmann

Edited by Alexander Lohnau

Merge request reports

Loading