mirror of
https://github.com/vbatts/git-validation.git
synced 2024-12-28 08:16:31 +00:00
Merge pull request #22 from vbatts/docs_for_exclude
README: doc the exclude function
This commit is contained in:
commit
cc3ab48288
1 changed files with 13 additions and 6 deletions
19
README.md
19
README.md
|
@ -5,14 +5,14 @@ A way to do validation on git commits.
|
||||||
|
|
||||||
## install
|
## install
|
||||||
|
|
||||||
```bash
|
```console
|
||||||
vbatts@valse ~ (master) $ go get -u github.com/vbatts/git-validation
|
vbatts@valse ~ (master) $ go get -u github.com/vbatts/git-validation
|
||||||
```
|
```
|
||||||
|
|
||||||
## usage
|
## usage
|
||||||
|
|
||||||
The flags
|
The flags
|
||||||
```bash
|
```console
|
||||||
vbatts@valse ~/src/vb/git-validation (master *) $ git-validation -h
|
vbatts@valse ~/src/vb/git-validation (master *) $ git-validation -h
|
||||||
Usage of git-validation:
|
Usage of git-validation:
|
||||||
-D debug output
|
-D debug output
|
||||||
|
@ -28,14 +28,14 @@ Usage of git-validation:
|
||||||
```
|
```
|
||||||
|
|
||||||
The entire default rule set is run by default:
|
The entire default rule set is run by default:
|
||||||
```bash
|
```console
|
||||||
vbatts@valse ~/src/vb/git-validation (master) $ git-validation -list-rules
|
vbatts@valse ~/src/vb/git-validation (master) $ git-validation -list-rules
|
||||||
"DCO" -- makes sure the commits are signed
|
"DCO" -- makes sure the commits are signed
|
||||||
"short-subject" -- commit subjects are strictly less than 90 (github ellipsis length)
|
"short-subject" -- commit subjects are strictly less than 90 (github ellipsis length)
|
||||||
```
|
```
|
||||||
|
|
||||||
Or, specify comma-delimited rules to run:
|
Or, specify comma-delimited rules to run:
|
||||||
```bash
|
```console
|
||||||
vbatts@valse ~/src/vb/git-validation (master) $ git-validation -run DCO,short-subject
|
vbatts@valse ~/src/vb/git-validation (master) $ git-validation -run DCO,short-subject
|
||||||
* b243ca4 "README: adding install and usage" ... PASS
|
* b243ca4 "README: adding install and usage" ... PASS
|
||||||
* d614ccf "*: run tests in a runner" ... PASS
|
* d614ccf "*: run tests in a runner" ... PASS
|
||||||
|
@ -47,7 +47,7 @@ vbatts@valse ~/src/vb/git-validation (master) $ git-validation -run DCO,short-su
|
||||||
```
|
```
|
||||||
|
|
||||||
Verbosity shows each rule's output:
|
Verbosity shows each rule's output:
|
||||||
```bash
|
```console
|
||||||
vbatts@valse ~/src/vb/git-validation (master) $ git-validation -v
|
vbatts@valse ~/src/vb/git-validation (master) $ git-validation -v
|
||||||
* d614ccf "*: run tests in a runner" ... PASS
|
* d614ccf "*: run tests in a runner" ... PASS
|
||||||
- PASS - has a valid DCO
|
- PASS - has a valid DCO
|
||||||
|
@ -70,7 +70,7 @@ vbatts@valse ~/src/vb/git-validation (master) $ git-validation -v
|
||||||
```
|
```
|
||||||
|
|
||||||
Here's a failure:
|
Here's a failure:
|
||||||
```bash
|
```console
|
||||||
vbatts@valse ~/src/vb/git-validation (master) $ git-validation
|
vbatts@valse ~/src/vb/git-validation (master) $ git-validation
|
||||||
* 49f51a8 "README: adding install and usage" ... FAIL
|
* 49f51a8 "README: adding install and usage" ... FAIL
|
||||||
- FAIL - does not have a valid DCO
|
- FAIL - does not have a valid DCO
|
||||||
|
@ -85,6 +85,13 @@ vbatts@valse ~/src/vb/git-validation (master) $ echo $?
|
||||||
1
|
1
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Excluding paths that are out of the scope of your project:
|
||||||
|
```console
|
||||||
|
vbatts@valse ~/src/vb/git-validation (master) $ GIT_CHECK_EXCLUDE="./vendor" git-validation -q -run dangling-whitespace
|
||||||
|
...
|
||||||
|
```
|
||||||
|
using the `GIT_CHECK_EXCLUDE` environment variable
|
||||||
|
|
||||||
## Rules
|
## Rules
|
||||||
|
|
||||||
Default rules are added by registering them to the `validate` package.
|
Default rules are added by registering them to the `validate` package.
|
||||||
|
|
Loading…
Reference in a new issue