From 787ccfb46a7a11930d810d8f05427ed225609ae1 Mon Sep 17 00:00:00 2001 From: Alex Richardson Date: Fri, 16 Jun 2023 14:18:34 -0700 Subject: [PATCH] Add clang-format to the pre-commit hooks This formats the code with clang-format 15 since the pre-commit hook for clang-format 16 would require a newer version of pre-commit. --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c530a5bed..d8791c06f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,3 +16,8 @@ repos: exclude: '.*\.(diff|dump|patch|svg)' - id: check-yaml - id: check-added-large-files +- repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v15.0.7' + hooks: + - id: clang-format + types_or: [c, c++] # Don't try running clang-format on .json files