rules.mk: Add targets to check shell syntax
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m3s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m33s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m9s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m23s
CI / Packaging test (push) Successful in 0s

Add the target sh-syntax-check, which triggers bash syntax linting with shellcheck This commit stops short of making target all depend on it, because the fallout is impressive.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-19 12:48:16 +02:00
commit 3aecb6c685
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
2 changed files with 25 additions and 0 deletions

View file

@ -98,6 +98,14 @@ endif
ifndef PRISTINE_MAKE
PRISTINE_MAKE := umask $(MINIMAL_UMASK) && MAKEFLAGS=$(MINIMAL_MAKEFLAGS) LD_LIBRARY_PATH=$(MINIMAL_LD_LIBRARY_PATH) PATH=$(MINIMAL_PATH) $(MAKE)
endif
ifndef SHELLCHECK
SHELLCHECK := $(shell $(WHICH) shellcheck)
endif
ifdef SHELLCHECK
SHELLCHECK += -f gcc
else
SHELLCHECK := bash -n
endif
# ----- Function definitions