Merge pull request #3457 from yousong/bugfix/yousong-build-showdiff

build: show diffs made by checks
This commit is contained in:
yunion-ci-robot
2019-11-04 21:57:15 +08:00
committed by GitHub
+2
View File
@@ -126,6 +126,7 @@ fmt:
fmt-check: fmt
@if git status --short | grep -E '^.M .*/[^.]+.go'; then \
git diff | cat; \
echo "$@: working tree modified (possibly by gofmt)" >&2 ; \
false ; \
fi
@@ -149,6 +150,7 @@ gendocgo-check: gendocgo
goimports-check:
@goimports -w -local "yunion.io/x/:yunion.io/x/onecloud" pkg cmd; \
if git status --short | grep -E '^.M .*/[^.]+.go'; then \
git diff | cat; \
echo "$@: working tree modified (possibly by goimports)" >&2 ; \
echo "$@: " >&2 ; \
echo "$@: import spec should be grouped in order: std, 3rd-party, yunion.io/x, yunion.io/x/onecloud" >&2 ; \