Skip to content

Commit

Permalink
.tools: Run 'go fmt ./...' on each commit
Browse files Browse the repository at this point in the history
Instead of just checking the tip, run 'go fmt ./...' on each commit in
the series.  This makes sure we catch errors with earlier commits even
if they were fixed by subsequent commits.

Signed-off-by: W. Trevor King <wking@tremily.us>
  • Loading branch information
wking committed Sep 12, 2015
1 parent 5dff8c5 commit 404a639
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .tools/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ var DefaultRules = []ValidateRule{
func(c CommitEntry) (vr ValidateResult) {
return ExecTree(c, "go", "vet", "./...")
},
func(c CommitEntry) (vr ValidateResult) {
return ExecTree(c, "go", "fmt", "./...")
},
func(c CommitEntry) (vr ValidateResult) {
vr = ExecTree(c, os.ExpandEnv("$HOME/gopath/bin/golint"), "./...")
if len(vr.Detail) > 0 {
Expand Down

0 comments on commit 404a639

Please sign in to comment.