Skip to content

Commit

Permalink
Makefile: made golangci-lint-check a part of the static-check target
Browse files Browse the repository at this point in the history
  • Loading branch information
lni committed Oct 6, 2020
1 parent b41a90b commit b3b7192
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ tools-checkdisk:
###############################################################################
CHECKED_PKGS=$(shell go list ./...)
CHECKED_DIRS=$(subst $(PKGNAME), ,$(subst $(PKGNAME)/, ,$(CHECKED_PKGS)))
EXTRA_LINTERS=-E misspell -E scopelint -E interfacer
.PHONY: static-check
static-check:
@for p in $(CHECKED_PKGS); do \
Expand All @@ -266,15 +267,16 @@ static-check:
done;
@for p in $(CHECKED_DIRS); do \
ineffassign $$p; \
golangci-lint run $$p; \
golangci-lint run $(EXTRA_LINTERS) $$p; \
done;

EXTRA_LINTERS=-E dupl -E misspell -E scopelint -E interfacer
.PHONY: golangci-lint-check
golangci-lint-check:
.PHONY: extra-static-check
extra-static-check: override EXTRA_LINTERS :=-E dupl
extra-static-check:
@for p in $(CHECKED_DIRS); do \
golangci-lint run $$p; \
done;
@golangci-lint run $(EXTRA_LINTERS) .
golangci-lint run $(EXTRA_LINTERS) $$p; \
done;

###############################################################################
# clean
Expand Down

0 comments on commit b3b7192

Please sign in to comment.