summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJoris Roovers <jroovers@cisco.com>2016-03-02 09:44:21 +0100
committerJoris Roovers <jroovers@cisco.com>2016-03-02 09:44:21 +0100
commit2223a02047c23cf1b9f005896b49b813c76f4385 (patch)
tree0fb48ddd9f84a2b344843e74bfafc4e3f4953558 /docs
parentbda5c6dd7bc7cfd87a8244a9e6fa6ee1dc6c2c52 (diff)
Adding GitCommit class representing a git commit
Up until now, gitlint only had to notion of a git commit message. This commit adds the GitCommit class which stores both the commit message, and meta-info related to the commit (author, date, commit id, etc). This will allow us to write gitlint rules based on meta-info (e.g. restrictions on the author email address format). For now, the commit_msg property of the GitContext class just refers to the commit_msg of the last commit. This was done as a temporary measure to reduce the amount of code change in a single commit. Also made some minor documentation sites updates (not published yet).
Diffstat (limited to 'docs')
-rw-r--r--docs/configuration.md6
-rw-r--r--docs/index.md5
2 files changed, 8 insertions, 3 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index 951b624..6486d6d 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -54,7 +54,7 @@ Details about rule config options can be found in the Rules page.
# Commandline config #
-Alternatively, you can use one or more ```-c``` flags like so:
+You can also use one or more ```-c``` flags like so:
```
$ gitlint -c general.verbosity=2 -c title-max-length.line-length=80 -c B1.line-length=100
@@ -62,7 +62,9 @@ $ gitlint -c general.verbosity=2 -c title-max-length.line-length=80 -c B1.line-l
The generic config flag format is ```-c <rule>.<option>=<value>``` and supports all the same rules and options which
you can also use in a ```.gitlint``` config file.
-Finally, you can also disable gitlint for specific commit messages by adding ```gitlint-ignore: all``` to the commit
+# Commit specific config #
+
+You can also disable gitlint for specific commit messages by adding ```gitlint-ignore: all``` to the commit
message like so:
```
diff --git a/docs/index.md b/docs/index.md
index e630b78..3b1107b 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -46,7 +46,10 @@ NOTE: The returned exit code equals the number of errors found. [Some exit codes
For a list of available rules and their configuration options, have a look at the [Rules](rules.md) page.
-You can modify verbosity using the ```-v``` flag, like so:
+The [Configuration](configuration.md) page explains how you can modify gitlint's runtime behavior via command-line
+flags, a ```.gitlint``` configuration file or on a per commit basis.
+
+As a simple example, you can modify gitlint's verbosity using the ```-v``` flag, like so:
```bash
$ cat examples/commit-message-2 | gitlint -v
1: T1