Skip to content

Commit

Permalink
run shellcheck as part of lint if it is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbellamy committed Oct 25, 2016
1 parent 31552a0 commit 7a843d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lint
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 7a843d6

Please sign in to comment.