pre-commit helps managing and maintaining multi-language pre-commit hooks.
This commit adds a pre-commit configuration to run a certian version of
clang-format utility. Later we can add sections for other languages as
well. pre-commit developers also provide the CI system which uses the
same config file.
https://pre-commit.com/
https://pre-commit.ci/
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28436)
--- /dev/null
+ci:
+ autofix_prs: false
+repos:
+ - repo: "https://github.com/pre-commit/mirrors-clang-format"
+ rev: "v21.1.0"
+ hooks:
+ - id: "clang-format"
+ types_or: ["c"]