From cf0eb6bbd932c1fc6a130d55423c197d1b39bd20 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Sun, 29 Jun 2025 15:33:40 +0200 Subject: [PATCH] Add .pre-commit-config.yaml --- .pre-commit-config.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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 000000000..1844f7f2f --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,25 @@ +# Pre-commit hooks for automated formatting and linting +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks + +repos: + # C++ formatting with clang-format + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v20.1.7 + hooks: + - id: clang-format + files: \.(cpp|hpp|c|h)$ + exclude: ^(3rdparty/|build.*/|install/) + args: [--style=file] + + # CMake formatting + - repo: https://github.com/cheshirekow/cmake-format-precommit + rev: v0.6.13 + hooks: + - id: cmake-format + files: \.(cmake|CMakeLists\.txt)$ + exclude: ^(3rdparty/|build.*/|install/) + +# Configuration +default_stages: [pre-commit] +fail_fast: false