diff --git a/.github/workflows/checkformat.yml b/.github/workflows/checkformat.yml index 0119fc56..06f1f2be 100644 --- a/.github/workflows/checkformat.yml +++ b/.github/workflows/checkformat.yml @@ -16,4 +16,4 @@ jobs: - name: Check format run: | sudo apt install clang-format - contrib/checkformat.bash + contrib/checkformat.sh diff --git a/contrib/checkformat.bash b/contrib/checkformat.sh similarity index 66% rename from contrib/checkformat.bash rename to contrib/checkformat.sh index bcf11b1a..7a5e2c8b 100755 --- a/contrib/checkformat.bash +++ b/contrib/checkformat.sh @@ -1,10 +1,10 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # SPDX-License-Identifier: MIT 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 echo 'Unformatted files:'