mirror of https://github.com/ceph/go-ceph
makefile: add check-shell rule
The check-shell rule will use shellcheck to help ensure high quality shell scripts. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
86802199f8
commit
f5d1adf26f
10
Makefile
10
Makefile
|
@ -205,9 +205,11 @@ $(RESULTS_DIR):
|
|||
mkdir -p $(RESULTS_DIR)
|
||||
endif
|
||||
|
||||
SHELL_SOURCES=entrypoint.sh micro-osd.sh
|
||||
|
||||
.PHONY: ci-image
|
||||
ci-image: $(BUILDFILE)
|
||||
$(BUILDFILE): $(CONTAINER_CONFIG_DIR)/Dockerfile entrypoint.sh micro-osd.sh
|
||||
$(BUILDFILE): $(CONTAINER_CONFIG_DIR)/Dockerfile $(SHELL_SOURCES)
|
||||
$(CONTAINER_CMD) build \
|
||||
$(CONTAINER_BUILD_ARGS) \
|
||||
$(CONTAINER_BUILD_OPTS) \
|
||||
|
@ -216,7 +218,7 @@ $(BUILDFILE): $(CONTAINER_CONFIG_DIR)/Dockerfile entrypoint.sh micro-osd.sh
|
|||
@$(CONTAINER_CMD) inspect -f '{{.Id}}' $(CI_IMAGE_TAG) > $(BUILDFILE)
|
||||
echo $(CEPH_VERSION) >> $(BUILDFILE)
|
||||
|
||||
check: check-revive check-format
|
||||
check: check-revive check-format check-shell
|
||||
|
||||
check-format:
|
||||
! $(GOFMT_CMD) $(CHECK_GOFMT_FLAGS) . | sed 's,^,formatting error: ,' | grep 'go$$'
|
||||
|
@ -226,6 +228,10 @@ check-revive:
|
|||
# See: https://github.com/mgechev/revive
|
||||
revive -config .revive.toml $$(find . -name '*.go')
|
||||
|
||||
check-shell:
|
||||
shellcheck -fgcc $(SHELL_SOURCES)
|
||||
|
||||
|
||||
# Do a quick compile only check of the tests and impliclity the
|
||||
# library code as well.
|
||||
test-binaries: \
|
||||
|
|
Loading…
Reference in New Issue