Skip to content

Commit 404a639

Browse files
committed
.tools: Run 'go fmt ./...' on each commit
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 <[email protected]>
1 parent 5dff8c5 commit 404a639

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.tools/validate.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ var DefaultRules = []ValidateRule{
4646
func(c CommitEntry) (vr ValidateResult) {
4747
return ExecTree(c, "go", "vet", "./...")
4848
},
49+
func(c CommitEntry) (vr ValidateResult) {
50+
return ExecTree(c, "go", "fmt", "./...")
51+
},
4952
func(c CommitEntry) (vr ValidateResult) {
5053
vr = ExecTree(c, os.ExpandEnv("$HOME/gopath/bin/golint"), "./...")
5154
if len(vr.Detail) > 0 {

0 commit comments

Comments
 (0)