Skip to content

Commit 3d80552

Browse files
committed
Update common Prometheus files
Signed-off-by: prombot <[email protected]>
1 parent 09b6210 commit 3d80552

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile.common

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ common-all: precheck style check_license lint yamllint unused build test
112112
.PHONY: common-style
113113
common-style:
114114
@echo ">> checking code style"
115-
@fmtRes=$$($(GOFMT) -d $$(find . -path ./vendor -prune -o -name '*.go' -print)); \
115+
@fmtRes=$$($(GOFMT) -d $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -name '*.go' -print)); \
116116
if [ -n "$${fmtRes}" ]; then \
117117
echo "gofmt checking failed!"; echo "$${fmtRes}"; echo; \
118118
echo "Please ensure you are using $$($(GO) version) for formatting code."; \
@@ -122,7 +122,7 @@ common-style:
122122
.PHONY: common-check_license
123123
common-check_license:
124124
@echo ">> checking license header"
125-
@licRes=$$(for file in $$(find . -type f -iname '*.go' ! -path './vendor/*') ; do \
125+
@licRes=$$(for file in $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -type f -iname '*.go' -print) ; do \
126126
awk 'NR<=3' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \
127127
done); \
128128
if [ -n "$${licRes}" ]; then \

0 commit comments

Comments
 (0)