提交 e2ff1f56 编写于 作者: T Thomas Stromberg

Show diff only on changed files that are not excluded.

上级 4e3c2bed
......@@ -48,10 +48,12 @@ ignore="vendor\|\_gopath\|assets.go\|out"
# Check gofmt
echo "Checking gofmt..."
set +e
files=$(gofmt -d -s . | grep -v ${ignore})
files=$(gofmt -l -s . | grep -v ${ignore})
set -e
if [[ $files ]]; then
gofmt -d ${files}
echo "Gofmt errors in files: $files"
exit 1
fi
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册