From adb8897a88eeef5b86460c4fb519dcf84cfea2f9 Mon Sep 17 00:00:00 2001 From: "Dr. Denis" Date: Wed, 3 May 2023 08:39:43 +0200 Subject: [PATCH] [CI] Use clangformat hook and don't install it manually (#1007) * [CI] Use clangformat hhok and don't install it manually * Don't install manually clang-format --- .github/workflows/ci-format.yml | 2 +- .pre-commit-config.yaml | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-format.yml b/.github/workflows/ci-format.yml index 2020dd2f77..83fe361f4d 100644 --- a/.github/workflows/ci-format.yml +++ b/.github/workflows/ci-format.yml @@ -17,7 +17,7 @@ jobs: with: python-version: '3.10' - name: Install system hooks - run: sudo apt install -qq clang-format-14 cppcheck + run: sudo apt install -qq cppcheck - uses: pre-commit/action@v3.0.0 with: extra_args: --all-files --hook-stage manual diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4af4875830..d4f6fea70b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -61,15 +61,10 @@ repos: args: ["--extend-ignore=E501"] # CPP hooks - - repo: local + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v14.0.6 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'] - repo: local hooks: