From 25d013c905306829da13ed14189e994bac5a8137 Mon Sep 17 00:00:00 2001 From: Andrew Rynhard Date: Fri, 5 Jul 2019 00:38:40 +0000 Subject: [PATCH] docs: update README This PR adds an up-to-date example of .conform.yaml, and example output. Signed-off-by: Andrew Rynhard --- README.md | 58 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 0837f881..b959e9f4 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 -license PASS +POLICY CHECK STATUS MESSAGE +commit Header Length PASS +commit DCO PASS +commit Imperative Mood PASS +commit Conventional Commit PASS +commit Number of Commits PASS +commit Commit Body PASS +license File Header PASS ``` ### License