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:
32
32
find . -path ' **/vendor' -prune -or -type f -iname ' *.go' ! -empty -print0 | xargs -0 grep -L " //\s*autoformat-ignore" | xargs gofmt -w
33
33
34
34
check-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"
36
41
37
42
ifeq ($(QHELP_OUT_DIR ) ,)
38
43
# If not otherwise specified, compile qhelp to markdown in place
You can’t perform that action at this time.
0 commit comments