Lines Matching full:line
22 name = "body-min-line-count"
28 … options_spec = [IntOption('min-line-count', 1, "Minimum body line count excluding Signed-off-by")]
33 min_line_count = self.options['min-line-count'].value
35 … message = "Commit message body is empty, should at least have {} line(s).".format(min_line_count)
40 name = "body-max-line-count"
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 …We keep things simple here and just check whether the commit body contains a line that starts with…
69 for line in commit.message.body:
70 if line.lower().startswith("signed-off-by"):
71 … if not re.search(r"(^)Signed-off-by: ([-'\w.]+) ([-'\w.]+) (.*)", line, flags=flags):
75 …return [RuleViolation(self.id, "Commit message does not contain a 'Signed-off-by:' line", line_nr=…
81 options_spec = [IntOption('line-length', 75, "Max line length")]
84 def validate(self, line, _commit): argument
85 max_length = self.options['line-length'].value
86 if len(line) > max_length and not line.startswith("Revert"):
87 … return [RuleViolation(self.id, self.violation_message.format(len(line), max_length), line)]
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})"
109 def validate(self, line, _commit): argument
110 max_length = self.options['line-length'].value
111 …re.findall(r'http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', line)
112 if line.lower().startswith('signed-off-by') or line.lower().startswith('co-authored-by'):
118 if len(line) > max_length:
119 … return [RuleViolation(self.id, self.violation_message.format(len(line), max_length), line)]
127 def validate(self, line, _commit): argument
130 if re.search(rf"^\s*{tag}:", line, flags=flags):