Skip to content

Commit

Permalink
Makefile: implement shellcheck as part of make lint
Browse files Browse the repository at this point in the history
  • Loading branch information
schuellerf committed Oct 24, 2024
1 parent 1191c45 commit b5f2d97
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,14 @@ container_composer_golangci_built.info: Makefile $(GOLANGCI_CONTAINERFILE) tools
echo "Image last built on" > $@
date >> $@

# trying to catch our use cases of the github action implementation
# https://github.com/ludeeus/action-shellcheck/blob/master/action.yaml#L164
SHELLCHECK_FILES=$(shell find . -name "*.sh" -not -regex "./vendor/.*")

.PHONY: lint
lint: $(GOLANGCI_LINT_CACHE_DIR) container_composer_golangci_built.info
podman run -t --rm -v $(SRCDIR):/app:z -v $(GOLANGCI_LINT_CACHE_DIR):/root/.cache:z -w /app $(GOLANGCI_COMPOSER_IMAGE) golangci-lint run -v
echo "$(SHELLCHECK_FILES)" | xargs shellcheck --shell bash -e SC1091 -e SC2002 -e SC2317

# The OpenShift CLI - maybe get it from https://access.redhat.com/downloads/content/290
OC_EXECUTABLE ?= oc
Expand Down

0 comments on commit b5f2d97

Please sign in to comment.