Skip to content

Commit 6b17810

Browse files
authored
Merge pull request #5 from sysprog21/bump-clang-format
CI: Bump clang-format from 18 to 21
2 parents 0351d13 + c522cea commit 6b17810

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.ci/check-format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ret=0
66

77
# Check C/C++ files with clang-format
88
while IFS= read -r -d '' file; do
9-
clang-format-18 -n --Werror "${file}" || ret=1
9+
clang-format-21 -n --Werror "${file}" || ret=1
1010
done < <(git ls-files -z '*.c' '*.cpp' '*.h' ':!:*/submodule/*')
1111

1212
# Check shell scripts with shfmt

.github/workflows/main.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@ jobs:
2222
timeout-minutes: 10
2323

2424
env:
25-
CLANG_FORMAT_VERSION: 18
25+
CLANG_FORMAT_VERSION: 21
2626

2727
steps:
2828
- name: Checkout
2929
uses: actions/checkout@v6
3030

3131
- name: Install linting tools
3232
run: |
33+
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
34+
sudo add-apt-repository -y "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-${{ env.CLANG_FORMAT_VERSION }} main"
3335
sudo apt-get update
3436
sudo apt-get install -y --no-install-recommends clang-format-${{ env.CLANG_FORMAT_VERSION }} shfmt
3537

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ However, participation requires adherence to fundamental ground rules:
4747
For instance, opt for "initialize" over "initialise" and "color" rather than "colour".
4848

4949
Software requirement:
50-
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html) version 18.
50+
* [clang-format](https://clang.llvm.org/docs/ClangFormat.html) version 21+.
5151
* [shfmt](https://github.com/mvdan/sh).
5252
* [black](https://github.com/psf/black) version 25.1.0.
5353

0 commit comments

Comments
 (0)