summaryrefslogtreecommitdiffstats
path: root/cppcheck.sh
diff options
context:
space:
mode:
authorPaweł Krupa <pawel@krupa.net.pl>2018-09-29 01:09:34 +0200
committerCosta Tsaousis <costa@tsaousis.gr>2018-09-29 02:09:34 +0300
commita1b6a7f5328974aaddd7f631135c58e1d620c820 (patch)
treef834274490755daeddc0b445e9c75d18b71b88e1 /cppcheck.sh
parent986e32a03b2f01ac09b23d7f1be28a2799d7fd3b (diff)
[cleanup crusade] Shellcheck (#4261)
* lint libreswan module * disable linting obsolete shell modules * shellcheck more shell modules * fix review; lint helper scripts * more shellcheck * fix SC2235 in apache.chart.sh * shellcheck last portion of charts.d scripts * final shellcheck; make travis blocking * fix cppcheck * fix indents; fix expansion * fix local var assignments
Diffstat (limited to 'cppcheck.sh')
-rwxr-xr-xcppcheck.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/cppcheck.sh b/cppcheck.sh
index 152baf37a2..aba93c269b 100755
--- a/cppcheck.sh
+++ b/cppcheck.sh
@@ -2,6 +2,7 @@
# echo >>/tmp/cppcheck.log "cppcheck ${*}"
+# shellcheck disable=SC2230
cppcheck=$(which cppcheck 2>/dev/null || command -v cppcheck 2>/dev/null)
[ -z "${cppcheck}" ] && echo >&2 "install cppcheck." && exit 1
@@ -17,6 +18,7 @@ cd "${base}/src" || exit 1
file="${1}"
shift
+# shellcheck disable=SC2235
([ "${file}" = "${base}" ] || [ -z "${file}" ]) && file="${base}/src"
"${cppcheck}" \