summaryrefslogtreecommitdiff
path: root/sanity-check.sh
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2020-04-30 10:14:08 +0100
committerDavid Spickett <david.spickett@linaro.org>2020-04-30 10:16:08 +0100
commit9f60d3366e38cefa3085610b4ef2bb03558d9d0d (patch)
treeadc594b2f4043d407b3afe0bbf0114084242be2f /sanity-check.sh
parent5e5cdf3372932f00151ceff9388165201ebe5106 (diff)
Shellcheck fixes round 5
Quote command line args in tcwg_bmk-build. Remove the manual list of shellcheck excludes now that we've settled on a newer version that supports --severity. Change-Id: I102ea9bad1ac6245885c410edf3410b13b0727c6
Diffstat (limited to 'sanity-check.sh')
-rwxr-xr-xsanity-check.sh25
1 files changed, 2 insertions, 23 deletions
diff --git a/sanity-check.sh b/sanity-check.sh
index 54abb4f3..2dd899c5 100755
--- a/sanity-check.sh
+++ b/sanity-check.sh
@@ -15,26 +15,5 @@ else
files=("${@}")
fi
-# New versions can set a minimum level
-if (shellcheck 2>&1 || true) | grep -q -- --severity=SEVERITY; then
- ignore=(--severity=warning)
-else
- # Manual list for older versions
- ignore=(
- # All STYLE warnings seen so far
- -e SC2001 # See if you can use ${variable//search/replace} instead.
- -e SC2002 # Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.
- -e SC2004 # $/${} is unnecessary on arithmetic variables.
- -e SC2006 # Use $(..) instead of legacy `..`.
- # All INFO warnings seen so far
- -e SC2016 # Expressions don't expand in single quotes, use double quotes for that.
- -e SC2086 # Double quote to prevent globbing and word splitting.
- -e SC2102 # Ranges can only match single chars (mentioned due to duplicates).
- -e SC2094 # Make sure not to read and write the same file in the same pipeline.
- -e SC2029 # Note that, unescaped, this expands on the client side.
- -e SC2030 # Modification of PATH is local (to subshell caused by (..) group).
- -e SC2031 # baseline_branch was modified in a subshell. That change might be lost.
- )
-fi
-
-shellcheck "${files[@]}" "${ignore[@]}"
+# Assuming shellcheck >= 0.7.0
+shellcheck "${files[@]}" --severity=warning