Lines Matching +full:max +full:- +full:x

1 # SPDX-License-Identifier: Apache-2.0
4 The classes below are examples of user-defined CommitRules. Commit rules are gitlint rules that
22 name = "body-min-line-count"
24 # A rule MUST have an *unique* id, we recommend starting with UC (for User-defined Commit-rule).
28 … options_spec = [IntOption('min-line-count', 1, "Minimum body line count excluding Signed-off-by")]
31 …filtered = [x for x in commit.message.body if not x.lower().startswith("signed-off-by") and x != '…
33 min_line_count = self.options['min-line-count'].value
40 name = "body-max-line-count"
42 # A rule MUST have an *unique* id, we recommend starting with UC (for User-defined Commit-rule).
46 options_spec = [IntOption('max-line-count', 200, "Maximum body line count")]
50 max_line_count = self.options['max-line-count'].value
56 """ This rule will enforce that each commit contains a "Signed-off-by" line.
57 …imple here and just check whether the commit body contains a line that starts with "Signed-off-by".
61 name = "body-requires-signed-off-by"
63 # A rule MUST have an *unique* id, we recommend starting with UC (for User-defined Commit-rule).
70 if line.lower().startswith("signed-off-by"):
71 … if not re.search(r"(^)Signed-off-by: ([-'\w.]+) ([-'\w.]+) (.*)", line, flags=flags):
72 … return [RuleViolation(self.id, "Signed-off-by: must have a full name", line_nr=1)]
75 …return [RuleViolation(self.id, "Commit message does not contain a 'Signed-off-by:' line", line_nr=…
78 name = "title-max-length-no-revert"
81 options_spec = [IntOption('line-length', 75, "Max line length")]
82 violation_message = "Commit title exceeds max length ({0}>{1})"
85 max_length = self.options['line-length'].value
90 name = "title-starts-with-subsystem"
103 name = "max-line-length-with-exceptions"
106 options_spec = [IntOption('line-length', 75, "Max line length")]
107 violation_message = "Commit message body line exceeds max length ({0}>{1})"
110 max_length = self.options['line-length'].value
111 …urls = re.findall(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+…
112 if line.lower().startswith('signed-off-by') or line.lower().startswith('co-authored-by'):
122 name = "body-contains-blocked-tags"
125 tags = ["Change-Id"]