File tree Expand file tree Collapse file tree 1 file changed +40
-12
lines changed Expand file tree Collapse file tree 1 file changed +40
-12
lines changed Original file line number Diff line number Diff line change 11name : clang-format Check
2- on : [push, pull_request]
2+
3+ env :
4+ INCLUDE_REGEX : ^.*\.((((c|C)(c|pp|xx|\+\+)?$)|((h|H)h?(pp|xx|\+\+)?$))|(inl|ino|pde|proto|cu))$
5+
6+ on :
7+ push :
8+ paths :
9+ - ' **.ino'
10+ - ' **.cpp'
11+ - ' **.hpp'
12+ - ' **.h'
13+ - ' **.c'
14+ - ' **.inl'
15+ - ' **clang-format-check.yml'
16+ pull_request :
17+ - ' **.ino'
18+ - ' **.cpp'
19+ - ' **.hpp'
20+ - ' **.h'
21+ - ' **.c'
22+ - ' **.inl'
23+ - ' **clang-format-check.yml'
24+
325jobs :
426 formatting-check :
527 name : Formatting Check
931 path :
1032 - check : ' ./' # path to include
1133 exclude : ' ' # path to exclude
12- # - check: 'src'
13- # exclude: '(Fonts)' # Exclude file paths containing "Fonts"
14- # - check: 'examples'
15- # exclude: ''
34+ # - check: 'src'
35+ # exclude: '(Fonts)' # Exclude file paths containing "Fonts"
36+ # - check: 'examples'
37+ # exclude: ''
38+
1639 steps :
17- 18- - name : Run clang-format style check for C/C++/Protobuf programs.
19- 20- with :
21- clang-format-version : ' 13'
22- check-path : ${{ matrix.path['check'] }}
23- exclude-regex : ${{ matrix.path['exclude'] }}
40+ - name : Checkout
41+ uses : actions/checkout@v4
42+ with :
43+ ref : ${{ github.event.pull_request.head.sha }}
44+
45+ - name : Run clang-format style check for C/C++/Protobuf programs.
46+ uses :
jidicula/[email protected] # Using include-regex 10.x or later 47+ with :
48+ clang-format-version : ' 13'
49+ check-path : ${{ matrix.path['check'] }}
50+ exclude-regex : ${{ matrix.path['exclude'] }}
51+ include-regex : ${{ env.INCLUDE_REGEX }}
You can’t perform that action at this time.
0 commit comments