fix(deps): update module github.com/vbatts/git-validation to v1.2.1

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2023-10-23 17:03:31 +00:00
committed by GitHub
parent 19c870da0d
commit a8e1a5ed1b
38 changed files with 3651 additions and 17 deletions

View File

@@ -3,10 +3,10 @@ package main
import (
"flag"
"fmt"
"log"
"os"
"strings"
"github.com/sirupsen/logrus"
_ "github.com/vbatts/git-validation/rules/danglingwhitespace"
_ "github.com/vbatts/git-validation/rules/dco"
_ "github.com/vbatts/git-validation/rules/messageregexp"
@@ -27,6 +27,10 @@ var (
flTravisPROnly = flag.Bool("travis-pr-only", true, "when on travis, only run validations if the CI-Build is checking pull-request build")
)
func init() {
logrus.SetOutput(os.Stderr)
}
func main() {
flag.Parse()
@@ -62,7 +66,7 @@ func main() {
rules = validate.FilterRules(validate.RegisteredRules, validate.SanitizeFilters(*flRun))
}
if os.Getenv("DEBUG") != "" {
log.Printf("%#v", rules) // XXX maybe reduce this list
logrus.Printf("%#v", rules) // XXX maybe reduce this list
}
var commitRange = *flCommitRange
@@ -80,13 +84,14 @@ func main() {
}
}
logrus.Infof("using commit range: %s", commitRange)
runner, err := validate.NewRunner(*flDir, rules, commitRange, *flVerbose)
if err != nil {
log.Fatal(err)
logrus.Fatal(err)
}
if err := runner.Run(); err != nil {
log.Fatal(err)
logrus.Fatal(err)
}
_, fail := runner.Results.PassFail()
if fail > 0 {