Skip to content

Commit 206708c

Browse files
committed
Merge pull request #11 from vbatts/quiet_a_little_less
main: add a bit of output to -q
2 parents 8f67e73 + 3bad322 commit 206708c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func main() {
6666
}
6767
_, fail := runner.Results.PassFail()
6868
if fail > 0 {
69-
fmt.Printf("%d issues to fix\n", fail)
69+
fmt.Printf("%d commits to fix\n", fail)
7070
os.Exit(1)
7171
}
7272

validate/runner.go

+7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ func (r *Runner) Run() error {
7777
r.Results = append(r.Results, vr...)
7878
_, fail := vr.PassFail()
7979
if os.Getenv("QUIET") != "" {
80+
if fail != 0 {
81+
for _, res := range vr {
82+
if !res.Pass {
83+
fmt.Printf(" %s - FAIL - %s\n", commit["abbreviated_commit"], res.Msg)
84+
}
85+
}
86+
}
8087
// everything else in the loop is printing output.
8188
// If we're quiet, then just continue
8289
continue

0 commit comments

Comments
 (0)