File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,12 @@ autoformat:
3232 find . -path ' **/vendor' -prune -or -type f -iname ' *.go' ! -empty -print0 | xargs -0 grep -L " //\s*autoformat-ignore" | xargs gofmt -w
3333
3434check-formatting :
35- test -z " $$ (find . -path '**/vendor' -prune -or -type f -iname '*.go' ! -empty -print0 | xargs -0 grep -L " //\s * autoformat-ignore" | xargs gofmt -l)"
35+ @output=$$(find . -path '**/vendor' -prune -or -type f -iname '*.go' ! -empty -print0 | xargs -0 grep -L "//\s*autoformat-ignore" | xargs gofmt -l 2>&1 ) ; \
36+ if [ -n " $$ output" ]; then \
37+ echo " The following files need to be reformatted using gofmt:" ; \
38+ echo $$ output; \
39+ fi ; \
40+ test -z " $$ output"
3641
3742ifeq ($(QHELP_OUT_DIR ) ,)
3843# If not otherwise specified, compile qhelp to markdown in place
You can’t perform that action at this time.
0 commit comments