From 7a843d6d6759e4591b21e823e88094721929c2e7 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Tue, 25 Oct 2016 14:36:41 +0100 Subject: [PATCH] run shellcheck as part of lint if it is installed --- lint | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lint b/lint index d1dfde6931..c7084b0d58 100755 --- a/lint +++ b/lint @@ -136,6 +136,13 @@ lint_sh() { echo "${filename}: run shfmt -i 4 -w ${filename}" fi + # the shellcheck is completely optional. If you don't like it + # don't have it installed. + if type shellcheck >/dev/null 2>&1; then + shellcheck "${filename}" + lint_result=$? + fi + return $lint_result }