]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
add config file for pre-commit hooks framework
authorDmitry Misharov <dmitry@openssl.org>
Thu, 4 Sep 2025 09:08:13 +0000 (11:08 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 3 Oct 2025 07:03:14 +0000 (09:03 +0200)
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)

.pre-commit-config.yml [new file with mode: 0644]

diff --git a/.pre-commit-config.yml b/.pre-commit-config.yml
new file mode 100644 (file)
index 0000000..8bf7828
--- /dev/null
@@ -0,0 +1,8 @@
+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"]