pull/30/head
Simon Let 6 years ago
parent feb77ba425
commit 4ba791151d
  1. 6
      scripts/test.sh

@ -1,15 +1,17 @@
#!/usr/bin/env bash
# very simple tests to catch simple errors in scripts
# shellcheck disable=SC2016
[ "${BASH_SOURCE[0]}" != "scripts/test.sh" ] && echo 'Run this script using `make test`' && exit 1
for f in scripts/*.sh; do
echo "Running shellcheck on $f ..."
shellcheck $f --shell=bash --severity=error || exit 1
shellcheck "$f" --shell=bash --severity=error || exit 1
done
for f in scripts/{shellrc,util,reshctl,hooks}.sh; do
echo "Checking Zsh syntax of $f ..."
! zsh -n scripts/shellrc.sh && echo "Zsh syntax check failed!" && exit 1
! zsh -n "$f" && echo "Zsh syntax check failed!" && exit 1
done
for sh in bash zsh; do

Loading…
Cancel
Save