diff options
author | Joris Roovers <joris.roovers@gmail.com> | 2020-08-22 14:12:45 +0200 |
---|---|---|
committer | Joris Roovers <joris.roovers@gmail.com> | 2020-09-04 11:38:13 +0200 |
commit | 25364eb3f2766dc6facc8b4abc9f31ecea978c4b (patch) | |
tree | f177768f18868dfa9ea0757b6037a67f09945811 /examples/my_commit_rules.py | |
parent | 01c440a0eb10edacde6742a4061f616a5811919b (diff) |
User-defined Configuration Rules
Allows users to dynamically change gitlint's configuration and/or the commit
*before* any other rules are applied.
Relates to #126
Diffstat (limited to 'examples/my_commit_rules.py')
-rw-r--r-- | examples/my_commit_rules.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/my_commit_rules.py b/examples/my_commit_rules.py index e12e02d..b056bcf 100644 --- a/examples/my_commit_rules.py +++ b/examples/my_commit_rules.py @@ -1,9 +1,13 @@ +# -*- coding: utf-8 -*- + from gitlint.rules import CommitRule, RuleViolation from gitlint.options import IntOption, ListOption from gitlint import utils """ +Full details on user-defined rules: https://jorisroovers.com/gitlint/user_defined_rules + The classes below are examples of user-defined CommitRules. Commit rules are gitlint rules that act on the entire commit at once. Once the rules are discovered, gitlint will automatically take care of applying them to the entire commit. This happens exactly once per commit. |