Skip to content

Commit

Permalink
update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
guy muroch committed Jul 17, 2024
1 parent 08726b0 commit de5c24a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ COV_CMD="-cover"
ifeq ($(COVERAGE),true)
COV_CMD=-coverpkg=./... -covermode="atomic" -coverprofile="coverage.out"
endif
UNFORMATTED=$(shell gofmt -l .)

#Lint
.PHONY: lint-prepare
Expand All @@ -36,10 +37,8 @@ lint-prepare:
.PHONY: lint
lint:
./bin/golangci-lint run -v ./...
@UNFORMATTED=$$(gofmt -s -l .); \
if [ ! -z "$$UNFORMATTED" ]; then \
echo "Some files require formatting, please run 'go fmt ./...'"; \
echo "$$UNFORMATTED"; \
@if [ ! -z "${UNFORMATTED}" ]; then \
echo "Some files requires formatting, please run 'go fmt ./...'"; \
exit 1; \
fi

Expand Down

0 comments on commit de5c24a

Please sign in to comment.