Skip to content

Commit

Permalink
Makefile: fix golint target (elastic#4183)
Browse files Browse the repository at this point in the history
  • Loading branch information
axw committed Sep 10, 2020
1 parent 44c2f65 commit dd69357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,11 @@ build/index-pattern.json: $(PYTHON) apm-server
GOLINT_TARGETS?=$(shell go list ./...)
GOLINT_UPSTREAM?=origin/7.x
REVIEWDOG_FLAGS?=-conf=reviewdog.yml -f=golint -diff="git diff $(GOLINT_UPSTREAM)"
GOLINT_COMMAND=$(shell $(GOLINT) ${GOLINT_TARGETS} | grep -v "should have comment" | $(REVIEWDOG) $(REVIEWDOG_FLAGS))
GOLINT_COMMAND=$(GOLINT) ${GOLINT_TARGETS} | grep -v "should have comment" | $(REVIEWDOG) $(REVIEWDOG_FLAGS)

.PHONY: golint
golint: $(GOLINT) $(REVIEWDOG)
@test -z "$(GOLINT_COMMAND)" || (echo "$(GOLINT_COMMAND)" && exit 1)
@output=$$($(GOLINT_COMMAND)); test -z "$$output" || (echo $$output && exit 1)

.PHONY: staticcheck
staticcheck: $(STATICCHECK)
Expand Down

0 comments on commit dd69357

Please sign in to comment.