Makefile: add tools/prepare-source.sh to make lint
The idea is that at least `go fmt` is called on `make lint`. It's recommended to run `make push-check` before any push, still.
This commit is contained in:
parent
d3e3474fb7
commit
a3ef2b4a3c
1 changed files with 1 additions and 1 deletions
2
Makefile
2
Makefile
|
|
@ -182,7 +182,6 @@ push-check: lint build unit-tests srpm man
|
||||||
./tools/check-runners
|
./tools/check-runners
|
||||||
./tools/check-snapshots --errors-only .
|
./tools/check-snapshots --errors-only .
|
||||||
rpmlint --config rpmlint.config $(CURDIR)/rpmbuild/SRPMS/*
|
rpmlint --config rpmlint.config $(CURDIR)/rpmbuild/SRPMS/*
|
||||||
./tools/prepare-source.sh
|
|
||||||
@if [ 0 -ne $$(git status --porcelain --untracked-files|wc -l) ]; then \
|
@if [ 0 -ne $$(git status --porcelain --untracked-files|wc -l) ]; then \
|
||||||
echo "There should be no changed or untracked files"; \
|
echo "There should be no changed or untracked files"; \
|
||||||
git status --porcelain --untracked-files; \
|
git status --porcelain --untracked-files; \
|
||||||
|
|
@ -350,6 +349,7 @@ SHELLCHECK_FILES=$(shell find . -name "*.sh" -not -regex "./vendor/.*")
|
||||||
|
|
||||||
.PHONY: lint
|
.PHONY: lint
|
||||||
lint: $(GOLANGCI_LINT_CACHE_DIR) container_composer_golangci_built.info
|
lint: $(GOLANGCI_LINT_CACHE_DIR) container_composer_golangci_built.info
|
||||||
|
./tools/prepare-source.sh
|
||||||
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
|
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
|
echo "$(SHELLCHECK_FILES)" | xargs shellcheck --shell bash -e SC1091 -e SC2002 -e SC2317
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue