From 0ad0c67fe54203ae80dd6e1d7b2109c6a8537c74 Mon Sep 17 00:00:00 2001 From: Bradley Lowekamp Date: Mon, 8 Dec 2025 10:59:22 -0500 Subject: [PATCH] ENH: Add precommit config for clang-format --- .pre-commit-config.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..697433a --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +# .pre-commit-config.yaml +# for details see https://pre-commit.com +# for list of available hooks see https://pre-commit.com/hooks.html +# +# Preclude commits that do not conform to various criteria. +# +# If a pre-commit check must be skipped then use: `SKIP=check_id git commit` Where `check_id` is the id of the check to +# be skipped such as `black`. + +fail_fast: true +default_stages: [pre-commit] +repos: +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: v19.1.7 + hooks: + - id: clang-format + args: ['--style=file'] + files: '\.(c|cc|h|cxx|hxx)$'