File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 matrix :
99 path :
1010 - check : ' src'
11- exclude : ' third_party'
11+ exclude : ' third_party' # Exclude file paths containing "hello" or "world"
1212 - check : ' tests'
13- exclude : ' '
13+ exclude : ' ' # Nothing to exclude
1414 steps :
1515 - uses : actions/checkout@v3
16-
17- - name : Install clang-format 21.1.0
18- run : |
19- wget https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.0/clang+llvm-21.1.0-x86_64-linux-gnu-ubuntu-22.04.tar.xz
20- tar -xf clang+llvm-21.1.0-x86_64-linux-gnu-ubuntu-22.04.tar.xz
21- sudo cp clang+llvm-21.1.0-x86_64-linux-gnu-ubuntu-22.04/bin/clang-format /usr/local/bin/
22- clang-format --version
23-
24- - name : Run clang-format check
25- run : |
26- find ${{ matrix.path.check }} -name "*.cpp" -o -name "*.hpp" -o -name "*.cc" -o -name "*.c" -o -name "*.h" -o -name "*.proto" | \
27- grep -v "${{ matrix.path.exclude }}" | \
28- xargs clang-format --dry-run --Werror --style=file --fallback-style=Microsoft
16+ - name : Run clang-format style check for C/C++/Protobuf programs.
17+ uses : jidicula/clang-format-action@v4.11.0
18+ with :
19+ clang-format-version : ' 13'
20+ check-path : ${{ matrix.path['check'] }}
21+ exclude-regex : ${{ matrix.path['exclude'] }}
22+ fallback-style : ' Microsoft' # optional
You can’t perform that action at this time.
0 commit comments