shellcheck-tests.sh 542 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. # Exit on errors
  3. set -e
  4. # Verbose mode
  5. set -v
  6. # SC1117 was disabled after 0.5, because it was too pedantic
  7. EXCLUSIONS="--exclude=SC1117"
  8. # Output is prefixed with the name of the script
  9. myname=$(basename "$0")
  10. echo "$myname: finding chutney directory"
  11. TEST_DIR=$(dirname "$0")
  12. CHUTNEY_DIR=$(dirname "$TEST_DIR")
  13. echo "$myname: changing to chutney directory"
  14. cd "$CHUTNEY_DIR"
  15. echo "$myname: running shellcheck tests with $EXCLUSIONS"
  16. shellcheck "$EXCLUSIONS" chutney
  17. find . -name "*.sh" -exec shellcheck "$EXCLUSIONS" {} +