Add lint for [ instead of [[ in shells scripts

This commit is contained in:
Aneesh Agrawal 2016-08-05 09:42:04 -04:00
parent 9231ca1c69
commit f07d8f188a
5 changed files with 17 additions and 8 deletions

View file

@ -8,3 +8,7 @@ set -o nounset
echo "hello world"
some_var=`echo "command substitution"`
another_var="$some_var"
if [ -z "${some_var}" ]; then
echo "should have used [["
fi
[ -z "${another_var}" ]