Touch up checkformat.bash

The logic can be slightly simplified,
and the script doesn't require Bash after all.
This commit is contained in:
ISSOtm
2026-04-16 01:05:03 +02:00
parent b218fd65a0
commit 4ea15ed85a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -16,4 +16,4 @@ jobs:
- name: Check format - name: Check format
run: | run: |
sudo apt install clang-format sudo apt install clang-format
contrib/checkformat.bash contrib/checkformat.sh
@@ -1,10 +1,10 @@
#!/usr/bin/env bash #!/usr/bin/env sh
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
clang-format --version clang-format --version
find . -type f \( -iname '*.hpp' -o -iname '*.cpp' \) -exec clang-format -i {} + find . -type f -iname '*.[ch]pp' -exec clang-format -i {} +
if ! git diff-index --quiet HEAD --; then if ! git diff-index --quiet HEAD --; then
echo 'Unformatted files:' echo 'Unformatted files:'