Lines Matching full:commit
4 The classes below are examples of user-defined CommitRules. Commit rules are gitlint rules that
5 act on the entire commit at once. Once the rules are discovered, gitlint will automatically take ca…
6 to the entire commit. This happens exactly once per commit.
8 A CommitRule contrasts with a LineRule (see examples/my_line_rules.py) in that a commit rule is onl…
9 an entire commit. This allows commit rules to implement more complex checks that span multiple line…
24 # A rule MUST have an *unique* id, we recommend starting with UC (for User-defined Commit-rule).
30 def validate(self, commit): argument
31 …filtered = [x for x in commit.message.body if not x.lower().startswith("signed-off-by") and x != '…
35 … message = "Commit message body is empty, should at least have {} line(s).".format(min_line_count)
42 # A rule MUST have an *unique* id, we recommend starting with UC (for User-defined Commit-rule).
48 def validate(self, commit): argument
49 line_count = len(commit.message.body)
52 …message = "Commit message body contains too many lines ({0} > {1})".format(line_count, max_line_co…
56 """ This rule will enforce that each commit contains a "Signed-off-by" line.
57 …We keep things simple here and just check whether the commit body contains a line that starts with…
63 # A rule MUST have an *unique* id, we recommend starting with UC (for User-defined Commit-rule).
66 def validate(self, commit): argument
69 for line in commit.message.body:
75 …return [RuleViolation(self.id, "Commit message does not contain a 'Signed-off-by:' line", line_nr=…
82 violation_message = "Commit title exceeds max length ({0}>{1})"
98 …violation_message = "Commit title does not follow [subsystem]: [subject] (and should not start wit…
107 violation_message = "Commit message body line exceeds max length ({0}>{1})"
131 return [RuleViolation(self.id, f"Commit message contains a blocked tag: {tag}")]