@@ -5,14 +5,14 @@ A way to do validation on git commits.
55
66## install
77
8- ``` bash
8+ ``` console
99vbatts@valse ~ (master) $ go get -u github.com/vbatts/git-validation
1010```
1111
1212## usage
1313
1414The flags
15- ``` bash
15+ ``` console
1616vbatts@valse ~/src/vb/git-validation (master *) $ git-validation -h
1717Usage of git-validation:
1818 -D debug output
@@ -28,14 +28,14 @@ Usage of git-validation:
2828```
2929
3030The entire default rule set is run by default:
31- ``` bash
31+ ``` console
3232vbatts@valse ~/src/vb/git-validation (master) $ git-validation -list-rules
3333"DCO" -- makes sure the commits are signed
3434"short-subject" -- commit subjects are strictly less than 90 (github ellipsis length)
3535```
3636
3737Or, specify comma-delimited rules to run:
38- ``` bash
38+ ``` console
3939vbatts@valse ~/src/vb/git-validation (master) $ git-validation -run DCO,short-subject
4040 * b243ca4 "README: adding install and usage" ... PASS
4141 * d614ccf "*: run tests in a runner" ... PASS
@@ -47,7 +47,7 @@ vbatts@valse ~/src/vb/git-validation (master) $ git-validation -run DCO,short-su
4747```
4848
4949Verbosity shows each rule's output:
50- ``` bash
50+ ``` console
5151vbatts@valse ~/src/vb/git-validation (master) $ git-validation -v
5252 * d614ccf "*: run tests in a runner" ... PASS
5353 - PASS - has a valid DCO
@@ -70,7 +70,7 @@ vbatts@valse ~/src/vb/git-validation (master) $ git-validation -v
7070```
7171
7272Here's a failure:
73- ``` bash
73+ ``` console
7474vbatts@valse ~/src/vb/git-validation (master) $ git-validation
7575 * 49f51a8 "README: adding install and usage" ... FAIL
7676 - FAIL - does not have a valid DCO
@@ -85,6 +85,13 @@ vbatts@valse ~/src/vb/git-validation (master) $ echo $?
85851
8686```
8787
88+ Excluding paths that are out of the scope of your project:
89+ ``` console
90+ vbatts@valse ~/src/vb/git-validation (master) $ GIT_CHECK_EXCLUDE="./vendor" git-validation -q -run dangling-whitespace
91+ ...
92+ ```
93+ using the ` GIT_CHECK_EXCLUDE ` environment variable
94+
8895## Rules
8996
9097Default rules are added by registering them to the ` validate ` package.
0 commit comments