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:
parent
eba7575f7e
commit
769b4028a4
2 changed files with 14 additions and 2 deletions
4
main.go
4
main.go
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue