File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ common-all: precheck style check_license lint yamllint unused build test
112112.PHONY: common-style
113113common-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
123123common-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 \
You can’t perform that action at this time.
0 commit comments