Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dbe3bd0 commit 2a52455Copy full SHA for 2a52455
1 file changed
go/Makefile
@@ -32,7 +32,12 @@ autoformat:
32
find . -path '**/vendor' -prune -or -type f -iname '*.go' ! -empty -print0 | xargs -0 grep -L "//\s*autoformat-ignore" | xargs gofmt -w
33
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)"
+ @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"
41
42
ifeq ($(QHELP_OUT_DIR),)
43
# If not otherwise specified, compile qhelp to markdown in place
0 commit comments