diff --git a/bin/dib-lint b/bin/dib-lint index c0d8d8c7..3b1582c1 100755 --- a/bin/dib-lint +++ b/bin/dib-lint @@ -66,7 +66,7 @@ for i in $(find elements -type f); do fi fi - # Check that all scripts are set -e + # Check that all scripts are set -eu # NOTE(bnemec): This doesn't verify that the set call occurs high # enough in the file to be useful, but hopefully nobody will be # sticking set calls at the end of their file to trick us. And if @@ -82,6 +82,12 @@ for i in $(find elements -type f); do rc=1 fi fi + if ! excluded setu; then + if [ -z "$(grep "^set -[^ ]*u" $i)" ]; then + echo "ERROR: $i is not set -u" + rc=1 + fi + fi fi done exit $rc