File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
tools/make/lib/lint/shell Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,31 @@ SHELL_LINTER_FLAGS ?=
2727
2828# RULES #
2929
30+ # /
31+ # Checks whether [shellcheck][1] is installed.
32+ #
33+ # [1]: https://github.com/koalaman/shellcheck
34+ #
35+ # @private
36+ #
37+ # @example
38+ # make check-shellcheck
39+ # /
40+ check-shellcheck :
41+ ifeq (, $(shell command -v $(SHELLCHECK ) 2>/dev/null) )
42+ $(QUIET) echo ''
43+ $(QUIET) echo 'shellcheck is not installed. Please install shellcheck and try again.'
44+ $(QUIET) echo 'For install instructions, see https://github.com/koalaman/shellcheck'
45+ $(QUIET) echo 'and the project development guide.'
46+ $(QUIET) echo ''
47+ $(QUIET) exit 1
48+ else
49+ $(QUIET) echo 'shellcheck is installed.'
50+ $(QUIET) exit 0
51+ endif
52+
53+ .PHONY : check-shellcheck
54+
3055# /
3156# Lints shell script files.
3257#
You can’t perform that action at this time.
0 commit comments