1
0
mirror of https://github.com/golang/go synced 2024-09-24 19:30:12 -06:00

codereview: print gofmt message when aborting

R=r
CC=vish
http://go/go-review/1026013
This commit is contained in:
Russ Cox 2009-11-06 18:40:30 -08:00
parent b2d3701cce
commit f74beebb2f

View File

@ -594,11 +594,11 @@ def CheckGofmt(ui, repo, files, just_warn=False):
ui.warn("gofmt errors:\n" + errors.rstrip() + "\n")
return
if len(data) > 0:
msg = "gofmt needs to format these files (run hg gofmt):\n" + data
msg = "gofmt needs to format these files (run hg gofmt):\n" + Indent(data, "\t").rstrip()
if just_warn:
ui.warn("warning: " + msg)
ui.warn("warning: " + msg + "\n")
else:
raise util.Abort()
raise util.Abort(msg)
return
#######################################################################