From 7749958c54e185f9f65d658a18443e6e2d7c50f3 Mon Sep 17 00:00:00 2001 From: newell Date: Mon, 7 Oct 2024 10:00:12 -0700 Subject: [PATCH] Add hook for clang-format --- src/.pre-commit-config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/.pre-commit-config.yaml b/src/.pre-commit-config.yaml index f71d002..18a14f7 100644 --- a/src/.pre-commit-config.yaml +++ b/src/.pre-commit-config.yaml @@ -22,3 +22,11 @@ repos: pass_filenames: false description: Runs cargo clippy on the codebase. args: [develop, -c, cargo, clippy, --manifest-path, src/Cargo.toml, --tests] + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v19.1.0 + hooks: + - id: clang-format + name: clang-format + description: Checks formatting of C++ files using clang-format. + files: \.(cpp|h|hpp|c)$ + args: [-style=file, -fallback-style=none, -assume-filename=src/.clang-format]