diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-19 14:52:50 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-11-19 14:53:01 +0000 |
commit | f3b6c222fb11c96e2f8bbaa0622f46c8ec486874 (patch) | |
tree | 0f38497775e27d3e16b20573b36dd22aa5b24f3e /gitlint-core/gitlint/tests/samples/user_rules/my_commit_rules.py | |
parent | Releasing debian version 0.17.0-1. (diff) | |
download | gitlint-f3b6c222fb11c96e2f8bbaa0622f46c8ec486874.tar.xz gitlint-f3b6c222fb11c96e2f8bbaa0622f46c8ec486874.zip |
Merging upstream version 0.18.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | gitlint-core/gitlint/tests/samples/user_rules/my_commit_rules.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gitlint-core/gitlint/tests/samples/user_rules/my_commit_rules.py b/gitlint-core/gitlint/tests/samples/user_rules/my_commit_rules.py index 8b0907e..02c922d 100644 --- a/gitlint-core/gitlint/tests/samples/user_rules/my_commit_rules.py +++ b/gitlint-core/gitlint/tests/samples/user_rules/my_commit_rules.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - from gitlint.rules import CommitRule, RuleViolation from gitlint.options import IntOption @@ -7,11 +5,11 @@ from gitlint.options import IntOption class MyUserCommitRule(CommitRule): name = "my-üser-commit-rule" id = "UC1" - options_spec = [IntOption('violation-count', 1, "Number of violåtions to return")] + options_spec = [IntOption("violation-count", 1, "Number of violåtions to return")] def validate(self, _commit): violations = [] - for i in range(1, self.options['violation-count'].value + 1): + for i in range(1, self.options["violation-count"].value + 1): violations.append(RuleViolation(self.id, "Commit violåtion %d" % i, "Contënt %d" % i, i)) return violations @@ -19,6 +17,7 @@ class MyUserCommitRule(CommitRule): # The below code is present so that we can test that we actually ignore it + def func_should_be_ignored(): pass |