Browse Source

build: add shlint target for shellcheck (#11350)

tags/nightly
Jan Edmund Lazo 3 weeks ago
parent
commit
5689008060
2 changed files with 14 additions and 2 deletions
  1. +10
    -2
      Makefile
  2. +4
    -0
      ci/run_lint.sh

+ 10
- 2
Makefile 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

+ 4
- 0
ci/run_lint.sh 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 \

Loading…
Cancel
Save