From e902b7fe93611bea24b41c0a6e9013f93c0b6b83 Mon Sep 17 00:00:00 2001 From: Henning Kayser Date: Sat, 21 Jan 2023 22:05:20 +0100 Subject: [PATCH] Switch to clang-format-14 (#577) * Switch to clang-format-14 * Update CI format job Co-authored-by: Tyler Weaver --- .github/workflows/format.yml | 9 ++++++--- .pre-commit-config.yaml | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 897ed9f001..1eec80478b 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -10,15 +10,18 @@ on: branches: - main +permissions: + contents: read # to fetch code (actions/checkout) + jobs: pre-commit: name: Format - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: '3.10' - - name: Install clang-format-12 - run: sudo apt-get install clang-format-12 + - name: Install clang-format-14 + run: sudo apt-get install clang-format-14 - uses: pre-commit/action@v3.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 172b4055f2..01288066c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: - id: clang-format name: clang-format description: Format files with ClangFormat. - entry: clang-format-12 + 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']