mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-24 05:04:05 -08:00
Makefile: improve 'make style' reporting
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
cc878ea559
commit
a827f91aff
|
@ -49,7 +49,12 @@ all: style staticcheck unused build test
|
|||
.PHONY: common-style
|
||||
common-style:
|
||||
@echo ">> checking code style"
|
||||
! $(GOFMT) -d $$(find . -path ./vendor -prune -o -name '*.go' -print) | grep '^'
|
||||
@fmtRes=$$($(GOFMT) -d $$(find . -path ./vendor -prune -o -name '*.go' -print)); \
|
||||
if [ -n "$${fmtRes}" ]; then \
|
||||
echo "gofmt checking failed!"; echo "$${fmtRes}"; echo; \
|
||||
echo "Please ensure you are using $$($(GO) version) for formatting code."; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
.PHONY: common-check_license
|
||||
common-check_license:
|
||||
|
|
Loading…
Reference in a new issue