File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -203,6 +203,23 @@ run_lint() {
203203 fi
204204 fi
205205
206+ # Lint shell script files...
207+ files=$( echo " ${changed_files} " | while read -r file; do head -n1 " $file " | grep -q ' ^\#\!/usr/bin/env bash' && echo " $file " ; done | tr ' \n' ' ' )
208+ if [[ -n " ${files} " ]]; then
209+ make check-shell-linters > /dev/null >&2
210+ if [[ " $? " -ne 0 ]]; then
211+ echo ' ' >&2
212+ echo ' Unable to lint shell script files. Ensure that linters are installed.' >&2
213+ else
214+ make FILES=" ${files} " lint-shell-files > /dev/null >&2
215+ if [[ " $? " -ne 0 ]]; then
216+ echo ' ' >&2
217+ echo ' Shell script lint errors.' >&2
218+ return 1
219+ fi
220+ fi
221+ fi
222+
206223 # Lint license headers...
207224 files=$( echo " ${changed_files} " | tr ' \n' ' ' )
208225 if [[ -n " ${files} " ]]; then
You can’t perform that action at this time.
0 commit comments