Merging upstream version 0.15.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
470a4841cc
commit
3213982697
75 changed files with 1281 additions and 1555 deletions
|
@ -152,7 +152,7 @@ class SpecialChars(LineRule):
|
|||
# options can be accessed by looking them up by their name in self.options
|
||||
for char in self.options['special-chars'].value:
|
||||
if char in line:
|
||||
msg = "Title contains the special character '{0}'".format(char)
|
||||
msg = f"Title contains the special character '{char}'"
|
||||
violation = RuleViolation(self.id, msg, line)
|
||||
violations.append(violation)
|
||||
|
||||
|
@ -262,8 +262,7 @@ class BodyMaxLineCount(CommitRule):
|
|||
line_count = len(commit.message.body)
|
||||
max_line_count = self.options['max-line-count'].value
|
||||
if line_count > max_line_count:
|
||||
message = "Body contains too many lines ({0} > {1})".format(line_count,
|
||||
max_line_count)
|
||||
message = f"Body contains too many lines ({line_count} > {max_line_count})"
|
||||
return [RuleViolation(self.id, message, line_nr=1)]
|
||||
```
|
||||
|
||||
|
@ -371,7 +370,7 @@ class ReleaseConfigurationRule(ConfigurationRule):
|
|||
|
||||
# You can add any extra properties you want to the commit object,
|
||||
# these will be available later on in all rules.
|
||||
commit.my_property = u"This is my property"
|
||||
commit.my_property = "This is my property"
|
||||
```
|
||||
|
||||
For all available properties and methods on the `config` object, have a look at the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue