From f554735485de1a15f572dc39252a8b91b908744b Mon Sep 17 00:00:00 2001 From: TheRealGioviok <425gioviok@gmail.com> Date: Tue, 17 Feb 2026 18:52:44 +0100 Subject: [PATCH 1/7] Tentative Bench: 16752988 --- .github/workflows/clang-format.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index dc42fdd6..fb255cd8 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -19,9 +19,14 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + + - name: Install clang-format + run: sudo apt-get update && sudo apt-get install -y clang-format-20 - - name: Verify Formatting - uses: jidicula/clang-format-action@v4.15.0 - with: - clang-format-version: '20' - check-path: ${{ matrix.path }} + - name: Check code formatting + shell: pwsh + run: | + $PSNativeCommandUseErrorActionPreference = $true + Get-ChildItem -Recurse | ` + where -Property Name -match '^.*\.((((c|C)(c|pp|xx|\+\+)?$)|((h|H)h?(pp|xx|\+\+)?$))|(ino|pde|proto|cu))$' | ` + % { clang-format --style=file --dry-run --Werror $_.FullName } From afe2c67a8a9c133be4bf3f0000252001650fb053 Mon Sep 17 00:00:00 2001 From: TheRealGioviok <425gioviok@gmail.com> Date: Tue, 17 Feb 2026 18:57:17 +0100 Subject: [PATCH 2/7] tentative 2 Bench: 16752988 --- .github/workflows/clang-format.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index fb255cd8..98a7f80d 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -24,9 +24,6 @@ jobs: run: sudo apt-get update && sudo apt-get install -y clang-format-20 - name: Check code formatting - shell: pwsh run: | - $PSNativeCommandUseErrorActionPreference = $true - Get-ChildItem -Recurse | ` - where -Property Name -match '^.*\.((((c|C)(c|pp|xx|\+\+)?$)|((h|H)h?(pp|xx|\+\+)?$))|(ino|pde|proto|cu))$' | ` - % { clang-format --style=file --dry-run --Werror $_.FullName } + find tests -name '*.cpp' -o -name '*.h' | \ + xargs clang-format-20 --dry-run --Werror \ No newline at end of file From 80329ec14e1564c601b9ef4ea57774271532cc04 Mon Sep 17 00:00:00 2001 From: TheRealGioviok <425gioviok@gmail.com> Date: Tue, 17 Feb 2026 18:59:15 +0100 Subject: [PATCH 3/7] oops Bench: 16752988 --- .github/workflows/clang-format.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 98a7f80d..064a66aa 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -25,5 +25,5 @@ jobs: - name: Check code formatting run: | - find tests -name '*.cpp' -o -name '*.h' | \ + find tests -name '*.cpp' -o -name '*.hpp' | \ xargs clang-format-20 --dry-run --Werror \ No newline at end of file From dae58be1b0114044ce6435a7f77bc21b8d250f0e Mon Sep 17 00:00:00 2001 From: TheRealGioviok <425gioviok@gmail.com> Date: Tue, 17 Feb 2026 19:02:50 +0100 Subject: [PATCH 4/7] oops2 Bench: 16752988 --- .github/workflows/clang-format.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 064a66aa..39ad6f1c 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -11,8 +11,8 @@ jobs: strategy: matrix: path: - - 'src' - - 'tests' + - src + - tests steps: - name: Checkout Repo @@ -23,7 +23,7 @@ jobs: - name: Install clang-format run: sudo apt-get update && sudo apt-get install -y clang-format-20 - - name: Check code formatting + - name: Check code formatting (${{ matrix.path }}) run: | - find tests -name '*.cpp' -o -name '*.hpp' | \ - xargs clang-format-20 --dry-run --Werror \ No newline at end of file + find ${{ matrix.path }} \( -name '*.cpp' -o -name '*.hpp' \) -print0 | \ + xargs -0 clang-format-20 --dry-run --Werror From 9d400e480e106d1533dac6c8bc9664b4d8614e03 Mon Sep 17 00:00:00 2001 From: TheRealGioviok <425gioviok@gmail.com> Date: Tue, 17 Feb 2026 19:03:29 +0100 Subject: [PATCH 5/7] consistency Bench: 16752988 --- .github/workflows/clang-format.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 39ad6f1c..4e0c94ca 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -23,7 +23,7 @@ jobs: - name: Install clang-format run: sudo apt-get update && sudo apt-get install -y clang-format-20 - - name: Check code formatting (${{ matrix.path }}) + - name: Verify formatting (${{ matrix.path }}) run: | find ${{ matrix.path }} \( -name '*.cpp' -o -name '*.hpp' \) -print0 | \ xargs -0 clang-format-20 --dry-run --Werror From 300a0abcc1eba43ee251cc027bd79d0a4b1684aa Mon Sep 17 00:00:00 2001 From: TheRealGioviok <425gioviok@gmail.com> Date: Tue, 17 Feb 2026 19:05:52 +0100 Subject: [PATCH 6/7] Test breaking format Bench: 16752988 --- src/board.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/board.hpp b/src/board.hpp index 727e35c0..ec0f9fd1 100644 --- a/src/board.hpp +++ b/src/board.hpp @@ -251,10 +251,10 @@ struct Wordboard { return Bitboard{raw.test(pm).to_bits()}; } - [[nodiscard]] usize count_matching_mask(PieceMask piece_mask) const { - u16x64 pm = u16x64::splat(piece_mask.value()); - return (raw & pm).nonzeros_count(); - } + [[nodiscard]] usize count_matching_mask(PieceMask piece_mask) const { + u16x64 PM = u16x64::splat(piece_mask.value()); + return (raw & PM).nonzeros_count(); + } [[nodiscard]] PieceMask read(Square sq) const { PieceMask value; From eea451e095608cc37d6e39cb58a24281a3b651c3 Mon Sep 17 00:00:00 2001 From: TheRealGioviok <425gioviok@gmail.com> Date: Tue, 17 Feb 2026 19:08:05 +0100 Subject: [PATCH 7/7] Looks good :) Bench: 16752988 --- src/board.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/board.hpp b/src/board.hpp index ec0f9fd1..727e35c0 100644 --- a/src/board.hpp +++ b/src/board.hpp @@ -251,10 +251,10 @@ struct Wordboard { return Bitboard{raw.test(pm).to_bits()}; } - [[nodiscard]] usize count_matching_mask(PieceMask piece_mask) const { - u16x64 PM = u16x64::splat(piece_mask.value()); - return (raw & PM).nonzeros_count(); - } + [[nodiscard]] usize count_matching_mask(PieceMask piece_mask) const { + u16x64 pm = u16x64::splat(piece_mask.value()); + return (raw & pm).nonzeros_count(); + } [[nodiscard]] PieceMask read(Square sq) const { PieceMask value;