mirror of
https://github.com/vbatts/git-validation.git
synced 2025-01-29 22:57:33 +00:00
Merge pull request #11 from vbatts/quiet_a_little_less
main: add a bit of output to -q
This commit is contained in:
commit
206708c3bd
2 changed files with 8 additions and 1 deletions
2
main.go
2
main.go
|
@ -66,7 +66,7 @@ func main() {
|
|||
}
|
||||
_, fail := runner.Results.PassFail()
|
||||
if fail > 0 {
|
||||
fmt.Printf("%d issues to fix\n", fail)
|
||||
fmt.Printf("%d commits to fix\n", fail)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
|
|
|
@ -77,6 +77,13 @@ func (r *Runner) Run() error {
|
|||
r.Results = append(r.Results, vr...)
|
||||
_, fail := vr.PassFail()
|
||||
if os.Getenv("QUIET") != "" {
|
||||
if fail != 0 {
|
||||
for _, res := range vr {
|
||||
if !res.Pass {
|
||||
fmt.Printf(" %s - FAIL - %s\n", commit["abbreviated_commit"], res.Msg)
|
||||
}
|
||||
}
|
||||
}
|
||||
// everything else in the loop is printing output.
|
||||
// If we're quiet, then just continue
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue