Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 17 additions & 18 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Copyright 2023 Valve Corporation
# Copyright 2023 LunarG, Inc.
# Copyright 2026 Valve Corporation
# Copyright 2026 LunarG, Inc.
#
# SPDX-License-Identifier: Apache-2.0

Expand All @@ -17,20 +17,19 @@ permissions:
jobs:
clang-format:
name: clang-format
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
path:
- 'include'
- 'src'
- 'tests'
runs-on: ubuntu-latest

env:
CLANG_FORMAT_VERSION: 18
CLANG_FORMAT_FILES: "*.c *.h *.cpp *.hpp"

steps:
- uses: actions/checkout@v6
- name: clang-format version
run: clang-format --version
- name: Run clang-format
uses: jidicula/clang-format-action@v4.16.0
with:
clang-format-version: '18'
check-path: ${{ matrix.path }}
- uses: actions/checkout@v6.0.2
- name: Check formatting
run: |
for f in $(git ls-files -- ${CLANG_FORMAT_FILES}); do
echo "Checking $f"
clang-format-${CLANG_FORMAT_VERSION} -i --Werror "$f"
done
git diff --exit-code