1
0
Fork 0
mirror of https://github.com/vbatts/git-validation.git synced 2025-07-02 07:08:29 +00:00

main: adding a quiet flag to reduce the output

so you can test and just check return code

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2016-01-14 10:29:35 -05:00
parent eba7575f7e
commit 769b4028a4
2 changed files with 14 additions and 2 deletions

View file

@ -17,6 +17,7 @@ var (
flRun = flag.String("run", "", "comma delimited list of rules to run. Defaults to all.")
flVerbose = flag.Bool("v", false, "verbose")
flDebug = flag.Bool("D", false, "debug output")
flQuiet = flag.Bool("q", false, "less output")
flDir = flag.String("d", ".", "git directory to validate from")
)
@ -26,6 +27,9 @@ func main() {
if *flDebug {
os.Setenv("DEBUG", "1")
}
if *flQuiet {
os.Setenv("QUIET", "1")
}
if *flListRules {
for _, r := range validate.RegisteredRules {