Skip to content

Commit f1d007d

Browse files
Revert "update clang-format-check.yml for clang-format 21.1.0"
This reverts commit cd292e2.
1 parent cd292e2 commit f1d007d

1 file changed

Lines changed: 9 additions & 15 deletions

File tree

.github/workflows/clang-format-check.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,15 @@ jobs:
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

0 commit comments

Comments
 (0)