mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #3457 from yousong/bugfix/yousong-build-showdiff
build: show diffs made by checks
This commit is contained in:
@@ -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 ; \
|
||||
|
||||
Reference in New Issue
Block a user