just: Fix doublestar expansion in check-scripts

This commit is contained in:
Adrian Duke 2026-04-16 13:59:36 +01:00 committed by Fintan Halpenny
parent 083c9d1abc
commit f6bf13422d
1 changed files with 5 additions and 1 deletions

View File

@ -66,6 +66,10 @@ check-spelling: (verify-tool "codespell")
@echo "{{CHECK}}Checking for code typos...{{NORMAL}}" @echo "{{CHECK}}Checking for code typos...{{NORMAL}}"
@git ls-files -z | xargs -0 codespell --write-changes --check-filenames @git ls-files -z | xargs -0 codespell --write-changes --check-filenames
# just runs with `/bin/sh` which has no doublestar glob
# expansion, furthermore, `time ls **/*.sh` takes ~5s
# locally. The `find` solution below is fastest ~900ms.
#
# Run shellcheck on all shell scripts # Run shellcheck on all shell scripts
[group('pre-commit')] [group('pre-commit')]
[group('pre-push')] [group('pre-push')]
@ -73,7 +77,7 @@ check-spelling: (verify-tool "codespell")
[parallel] [parallel]
check-scripts: (verify-tool "shellcheck") check-scripts: (verify-tool "shellcheck")
@echo "{{CHECK}}Checking shell scripts...{{NORMAL}}" @echo "{{CHECK}}Checking shell scripts...{{NORMAL}}"
@shellcheck **/*.sh @find . -type f -name "*.sh" -exec shellcheck {} +
# Run checks for forbidden keywords # Run checks for forbidden keywords
[group('pre-commit')] [group('pre-commit')]