diff options
Diffstat (limited to 'examples/my_commit_rules.py')
-rw-r--r-- | examples/my_commit_rules.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/my_commit_rules.py b/examples/my_commit_rules.py index b056bcf..97edf4d 100644 --- a/examples/my_commit_rules.py +++ b/examples/my_commit_rules.py @@ -32,6 +32,8 @@ class BodyMaxLineCount(CommitRule): options_spec = [IntOption('max-line-count', 3, "Maximum body line count")] def validate(self, commit): + self.log.debug("BodyMaxLineCount: This line will be visible when running `gitlint --debug`") + line_count = len(commit.message.body) max_line_count = self.options['max-line-count'].value if line_count > max_line_count: @@ -51,6 +53,8 @@ class SignedOffBy(CommitRule): id = "UC2" def validate(self, commit): + self.log.debug("SignedOffBy: This line will be visible when running `gitlint --debug`") + for line in commit.message.body: if line.startswith("Signed-Off-By"): return @@ -73,6 +77,8 @@ class BranchNamingConventions(CommitRule): options_spec = [ListOption('branch-prefixes', ["feature/", "hotfix/", "release/"], "Allowed branch prefixes")] def validate(self, commit): + self.log.debug("BranchNamingConventions: This line will be visible when running `gitlint --debug`") + violations = [] allowed_branch_prefixes = self.options['branch-prefixes'].value for branch in commit.branches: |