Makefile: add check target to run shellcheck
RFC 1/1 Makefile: add check target to run shellcheck
shellcheck can be used to allow us to create a sanity check on shell scripts and also build a consistent set of rules. Although I actually find some annoying, consistancy is better than no consitancy check at all. This is inspired by blktests' own adoption of it and how it has found minor issues.
Signed-off-by Luis Chamberlain <[email protected]>
--- Makefile | 7 +++++++ 1 file changed, 7 insertions(+)
Makefile +7 -0
@@ -99,6 +99,13 @@ else $(Q)$(MAKE) $(MAKEOPTS) $(SRCTAR) endif +# We use shellcheck for sanity and consistency. Consistency is better than +# not having any. +check: + shellcheck -x -f gcc check new common/* \ + tests/*/[0-9]*[0-9] +.PHONY: check + $(SRCTAR) : default $(Q)git archive --prefix=$(PKG_NAME)-$(PKG_VERSION)/ --format=tar \ v$(PKG_VERSION) > $(PKG_NAME)-$(PKG_VERSION).tar
Signature · 1 line
2.34.1