mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 09:47:54 +00:00
5b9916e34b
Fixes shellcheck errors in script/* Adds a couple trailing newlines. Adds `script/shellcheck-scripts` and associated CI machinery. Current set ultra-conservative, does not output warnings, only errors.
12 lines
323 B
Bash
Executable file
12 lines
323 B
Bash
Executable file
#!/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
|