Skip to content

Commit

Permalink
docs: update README
Browse files Browse the repository at this point in the history
This PR adds an up-to-date example of .conform.yaml, and example output.

Signed-off-by: Andrew Rynhard <[email protected]>
  • Loading branch information
andrewrynhard committed Jul 5, 2019
1 parent 3b208c1 commit 25d013c
Showing 1 changed file with 34 additions and 24 deletions.
58 changes: 34 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Some of the policies included are:
- GPG signature
- [Conventional Commits](https://www.conventionalcommits.org)
- Imperative mood
- Maximum of one commit ahead of `master`
- Require a commit body
- **License Headers**: Enforce license headers on source code files.

## Getting Started
Expand All @@ -32,36 +34,44 @@ Create a file named `.conform.yaml` with the following contents:

```yaml
policies:
- type: commit
spec:
headerLength: 89
dco: true
gpg: true
imperative: true
conventional:
types:
- "type"
scopes:
- "scope"
- type: license
spec:
skipPaths:
- .git/
- .build*/
includeSuffixes:
- .ext
excludeSuffixes:
- .exclude-ext-prefix.ext
headerFile: LICENSE_HEADER
- type: commit
spec:
headerLength: 89
dco: true
gpg: false
imperative: true
maximumOfOneCommit: true
requireCommitBody: true
conventional:
types:
- "type"
scopes:
- "scope"
- type: license
spec:
skipPaths:
- .git/
- .build*/
includeSuffixes:
- .ext
excludeSuffixes:
- .exclude-ext-prefix.ext
header: |
This is the contents of a license header.
```
In the same directory, run:
```bash
$ conform enforce
POLICY STATUS MESSAGE
commit PASS <none>
license PASS <none>
POLICY CHECK STATUS MESSAGE
commit Header Length PASS <none>
commit DCO PASS <none>
commit Imperative Mood PASS <none>
commit Conventional Commit PASS <none>
commit Number of Commits PASS <none>
commit Commit Body PASS <none>
license File Header PASS <none>
```

### License
Expand Down

0 comments on commit 25d013c

Please sign in to comment.