build: add shlint target for shellcheck (#11350)

This commit is contained in:
Jan Edmund Lazo 2019-11-09 07:39:01 -05:00 committed by Marco Hinz
parent 9fb278ddea
commit 5689008060
2 changed files with 14 additions and 2 deletions

View File

@ -138,6 +138,14 @@ functionaltest-lua: | nvim
lualint: | build/.ran-cmake deps
$(BUILD_CMD) -C build lualint
shlint:
@shellcheck --version | head -n 2
shellcheck scripts/vim-patch.sh
_opt_shlint:
@command -v shellcheck && { $(MAKE) shlint; exit $$?; } \
|| echo "SKIP: shlint (shellcheck not found)"
pylint:
flake8 contrib/ scripts/ src/ test/
@ -188,7 +196,7 @@ appimage:
appimage-%:
bash scripts/genappimage.sh $*
lint: check-single-includes clint lualint _opt_pylint
lint: check-single-includes clint lualint _opt_pylint _opt_shlint
# Generic pattern rules, allowing for `make build/bin/nvim` etc.
# Does not work with "Unix Makefiles".
@ -200,4 +208,4 @@ $(DEPS_BUILD_DIR)/%:
$(BUILD_CMD) -C $(DEPS_BUILD_DIR) $(patsubst $(DEPS_BUILD_DIR)/%,%,$@)
endif
.PHONY: test lualint pylint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage checkprefix
.PHONY: test lualint pylint shlint functionaltest unittest lint clint clean distclean nvim libnvim cmake deps install appimage checkprefix

View File

@ -20,6 +20,10 @@ enter_suite 'pylint'
run_test 'make pylint' pylint
exit_suite --continue
enter_suite 'shlint'
run_test 'make shlint' shlint
exit_suite --continue
enter_suite single-includes
CLICOLOR_FORCE=1 run_test_wd \
--allow-hang \