1- # Copyright (c) 2023 Valve Corporation
2- # Copyright (c) 2023 LunarG, Inc.
1+ # Copyright 2026 Valve Corporation
2+ # Copyright 2026 LunarG, Inc.
33#
4- # Licensed under the Apache License, Version 2.0 (the "License");
5- # you may not use this file except in compliance with the License.
6- # You may obtain a copy of the License at
7- #
8- # http://www.apache.org/licenses/LICENSE-2.0
9- #
10- # Unless required by applicable law or agreed to in writing, software
11- # distributed under the License is distributed on an "AS IS" BASIS,
12- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- # See the License for the specific language governing permissions and
14- # limitations under the License.
4+ # SPDX-License-Identifier: Apache-2.0
155
166name : format
177
@@ -28,16 +18,18 @@ jobs:
2818 clang-format :
2919 name : clang-format
3020 runs-on : ubuntu-latest
31- strategy :
32- fail-fast : false
33- matrix :
34- path :
35- - ' loader'
36- - ' tests'
21+
22+ env :
23+ CLANG_FORMAT_VERSION : 16
24+ CLANG_FORMAT_FILES : " *.c *.h *.cpp *.hpp"
25+
3726 steps :
3827 - uses : actions/checkout@v6.0.2
39- - name : Run clang-format
40- uses : jidicula/clang-format-action@v4.16.0
41- with :
42- clang-format-version : ' 16'
43- check-path : ${{ matrix.path }}
28+ - name : Check formatting
29+ run : |
30+ for f in $(git ls-files -- ${CLANG_FORMAT_FILES}); do
31+ echo "Checking $f"
32+ clang-format-${CLANG_FORMAT_VERSION} -i --Werror "$f"
33+ done
34+
35+ git diff --exit-code
0 commit comments