@@ -6,14 +6,15 @@ A way to do validation on git commits.
66
77## install
88
9- ``` console
10- vbatts@valse ~ (master) $ go install github.com/vbatts/git-validation@latest
9+ ``` shell
10+ go install github.com/vbatts/git-validation@latest
1111```
1212
1313## usage
1414
1515The flags
16- ``` console
16+
17+ ``` shell
1718vbatts@valse ~ /src/vb/git-validation (master * ) $ git-validation -h
1819Usage of git-validation:
1920 -D debug output
@@ -29,7 +30,8 @@ Usage of git-validation:
2930```
3031
3132The entire default rule set is run by default:
32- ``` console
33+
34+ ``` shell
3335vbatts@valse ~ /src/vb/git-validation (master) $ git-validation -list-rules
3436" dangling-whitespace" -- checking the presence of dangling whitespaces on line endings
3537" DCO" -- makes sure the commits are signed
@@ -38,7 +40,8 @@ vbatts@valse ~/src/vb/git-validation (master) $ git-validation -list-rules
3840```
3941
4042Or, specify comma-delimited rules to run:
41- ``` console
43+
44+ ``` shell
4245vbatts@valse ~ /src/vb/git-validation (master) $ git-validation -run DCO,short-subject
4346 * b243ca4 " README: adding install and usage" ... PASS
4447 * d614ccf " *: run tests in a runner" ... PASS
@@ -50,7 +53,8 @@ vbatts@valse ~/src/vb/git-validation (master) $ git-validation -run DCO,short-su
5053```
5154
5255Verbosity shows each rule's output:
53- ``` console
56+
57+ ``` shell
5458vbatts@valse ~ /src/vb/git-validation (master) $ git-validation -v
5559 * d614ccf " *: run tests in a runner" ... PASS
5660 - PASS - has a valid DCO
@@ -73,7 +77,8 @@ vbatts@valse ~/src/vb/git-validation (master) $ git-validation -v
7377```
7478
7579Here's a failure:
76- ``` console
80+
81+ ``` shell
7782vbatts@valse ~ /src/vb/git-validation (master) $ git-validation
7883 * 49f51a8 " README: adding install and usage" ... FAIL
7984 - FAIL - does not have a valid DCO
@@ -89,12 +94,13 @@ vbatts@valse ~/src/vb/git-validation (master) $ echo $?
8994```
9095
9196Excluding paths that are out of the scope of your project:
92- ``` console
97+
98+ ``` shell
9399vbatts@valse ~ /src/vb/git-validation (master) $ GIT_CHECK_EXCLUDE=" ./vendor:./git/testdata" git-validation -q -run dangling-whitespace
94100...
95101```
96- using the ` GIT_CHECK_EXCLUDE ` environment variable. Multiple paths should be separated by colon(` : ` )
97102
103+ using the ` GIT_CHECK_EXCLUDE ` environment variable. Multiple paths should be separated by colon(` : ` )
98104
99105## Rules
100106
@@ -104,4 +110,3 @@ See [`./rules/`](./rules/).
104110Feel free to contribute more.
105111
106112Otherwise, by using ` validate ` package API directly, rules can be handed directly to the ` validate.Runner ` .
107-
0 commit comments