File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 18
18
push :
19
19
paths :
20
20
- ' .github/workflows/clang-format.yml'
21
+ - ' scripts/clang-format.sh'
21
22
- ' **.c'
22
23
- ' **.cpp'
23
24
- ' **.h'
24
- - ' **.hpp'
25
25
26
26
pull_request :
27
27
paths :
28
28
- ' .github/workflows/clang-format.yml'
29
+ - ' scripts/clang-format.sh'
29
30
- ' **.c'
30
31
- ' **.cpp'
31
32
- ' **.h'
32
- - ' **.hpp'
33
33
34
34
jobs :
35
35
build :
46
46
uses : actions/checkout@v2
47
47
48
48
- name : run clang-format on source files
49
- run : find . -regex '.*\.\(c\|cpp\|h\|hpp\)' | sort | xargs clang-format --verbose -i
49
+ run : ./scripts/ clang-format.sh --verbose
50
50
51
51
- name : ensure source files are unchanged
52
52
run : git diff --exit-code
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Copyright (C) 2021 Intel Corporation
3
+ # SPDX-License-Identifier: BSD-3-Clause
4
+
5
+ set -eu -o pipefail
6
+
7
+ find . -regex ' .*\.\(c\|cpp\|h\)' | sort | xargs clang-format -i " $@ "
You can’t perform that action at this time.
0 commit comments