aboutsummaryrefslogtreecommitdiff
path: root/kde-modules/kde-git-commit-hooks
AgeCommit message (Collapse)Author
2021-06-29Make pre-commit hook executableMilian Wolff
Otherwise recent versions of git will complain with: ``` hint: The '.git/hooks/pre-commit' hook was ignored because it's not set as executable. hint: You can disable this warning with `git config advice.ignoredHook false`. ```
2021-05-27Provide fallback error when no .clang-format file is presentAndreas Cord-Landwehr
This check fixes a probably rare case, where we land in a repository that contains this clang-format.sh hook but where the format file went missing. In such cases, clang-format falls back to the system defaults, which brings undesired defaults, e.g. enforced line breaks in comments after 90 chars, which cannot easily be reverted by a reformat. Since clang-format's --fallback-style=none option is not available for git clang-format, this comment reimplements the logic.
2021-01-16Add cmake function to configure git pre-commit hooksAlexander Lohnau
This will allow us to force QS checks before the developer commits a change. Currently only clang-format is supported, but as on #plasma and https://phabricator.kde.org/T11214 discussed we might want to add different formatters. By making the checks configurable we are flexible and can easily extend it.