Files
zed/script/shellcheck-scripts
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
323 B
Bash
Raw Normal View History

2024-11-18 21:41:22 +00:00
#!/usr/bin/env bash
set -euo pipefail
mode=${1:-error}
[[ "$mode" =~ ^(error|warning)$ ]] || { echo "Usage: $0 [error|warning]"; exit 1; }
cd "$(dirname "$0")/.." || exit 1
find script -maxdepth 1 -type f -print0 |
xargs -0 grep -l -E '^#!(/bin/|/usr/bin/env )(sh|bash|dash)' |
xargs -r shellcheck -x -S "$mode" -C