From 3dd2b1d5232e0c315bf35be5fdcd7165edca6415 Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Wed, 11 Jun 2025 08:34:16 +0200 Subject: [PATCH] Use the Python mirror for clang-format in pre-commit config (#1391) This will not require users to have a specific clang-format version installed. Also, this will be updated automatically, so we are not stuck with an old clang-format version. If formatting changes come in from a newer clang-format version, we can adapt our config whenever that happens. (cherry picked from commit 4b28496b6f1440fb0110c556713a72ce22f6c7ec) --- .pre-commit-config.yaml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cb66c9f1b..63f37649f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -86,15 +86,10 @@ repos: files: \.(h\+\+|h|hh|hxx|hpp|cuh|c|cc|cpp|cu|c\+\+|cxx|tpp|txx)$ args: ["--linelength=120"] - - repo: local + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: 'v20.1.5' hooks: - id: clang-format - name: clang-format - description: Format files with ClangFormat. - entry: clang-format-14 - language: system - files: \.(c|cc|cxx|cpp|frag|glsl|h|hpp|hxx|ih|ispc|ipp|java|js|m|proto|vert)$ - args: ['-fallback-style=none', '-i'] # Cmake hooks - repo: local