gitlint: fix check for line_count

We should check if the commits line is less than, not less/equal...

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2018-01-11 09:57:03 -05:00 committed by Anas Nashif
commit abfed53525

View file

@ -29,7 +29,7 @@ class BodyMinLineCount(CommitRule):
filtered = [x for x in commit.message.body if not x.lower().startswith("signed-off-by") and x != ''] filtered = [x for x in commit.message.body if not x.lower().startswith("signed-off-by") and x != '']
line_count = len(filtered) line_count = len(filtered)
min_line_count = self.options['min-line-count'].value min_line_count = self.options['min-line-count'].value
if line_count <= min_line_count: if line_count < min_line_count:
message = "Body has no content, should at least have {} line.".format(min_line_count) message = "Body has no content, should at least have {} line.".format(min_line_count)
return [RuleViolation(self.id, message, line_nr=1)] return [RuleViolation(self.id, message, line_nr=1)]