diff options
author | Aneesh Agrawal <aneeshusa@gmail.com> | 2016-08-05 09:42:04 -0400 |
---|---|---|
committer | Aneesh Agrawal <aneeshusa@gmail.com> | 2016-08-05 09:42:04 -0400 |
commit | f07d8f188a0621545957a0f348271d29b08704ec (patch) | |
tree | 588cf61bdc7b92ba628d5341d9e28bb40be46e7d /python/tidy/servo_tidy_tests/shell_tidy.sh | |
parent | 9231ca1c6991c2eaf0d7e08674b2fc9c84a31695 (diff) | |
download | servo-f07d8f188a0621545957a0f348271d29b08704ec.tar.gz servo-f07d8f188a0621545957a0f348271d29b08704ec.zip |
Add lint for `[` instead of `[[` in shells scripts
Diffstat (limited to 'python/tidy/servo_tidy_tests/shell_tidy.sh')
-rw-r--r-- | python/tidy/servo_tidy_tests/shell_tidy.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python/tidy/servo_tidy_tests/shell_tidy.sh b/python/tidy/servo_tidy_tests/shell_tidy.sh index e24b361fe16..e38358fc3b6 100644 --- a/python/tidy/servo_tidy_tests/shell_tidy.sh +++ b/python/tidy/servo_tidy_tests/shell_tidy.sh @@ -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}" ] |