scripts: Add ShellCheck lint target

Add a tracked runner that discovers Bash scripts under scripts/ and
checks them with external source resolution enabled. Expose it through
the top-level Makefile.

Run the same entry point from the patch lint workflow whenever a range
touches Bash lint inputs, and report its result explicitly.
This commit is contained in:
Gleb Chesnokov
2026-08-21 19:58:59 +03:00
parent f788bfd0d6
commit 28b811135d
3 changed files with 43 additions and 3 deletions
+5 -1
View File
@@ -102,6 +102,7 @@ SCST_SOURCE_FILES = $(shell if [ -e scripts/list-source-files ]; then \
help:
@echo " tags : make tags"
@echo " cov-build : make coverity build"
@echo " shellcheck : check Bash scripts"
@echo ""
@echo " all : make all"
@echo " clean : clean files"
@@ -194,6 +195,9 @@ cov-build:
exit $$?; \
done
shellcheck:
scripts/run-shellcheck
all clean extraclean install uninstall:
if [ $@ = extraclean ]; then rm -f TAGS tags cscope.out; fi
for d in $(SCST_DIR) $(ISCSI_DIR) $(QLA_DIR) $(SRP_DIR) \
@@ -513,7 +517,7 @@ multiple-release-archives:
2debug:
cd $(SCST_DIR) && $(MAKE) $@
.PHONY: help tags cov-build all clean extraclean install uninstall \
.PHONY: help tags cov-build shellcheck all clean extraclean install uninstall \
scst scst_clean scst_extraclean scst_install scst_uninstall \
docs docs_clean docs_extraclean \
scstadm scstadm_clean scstadm_extraclean scstadm_install scstadm_uninstall \