mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
checkpatch: Only consider certain signoffs
Formatted patches can contain a heirarchy of sign-offs. This is true when merging patches from different projects (eg. backports to the datapath directory from the linux net project). This means that a submitted backport will contain multiple signed-off tags, and not all should be considered. This commit updates checkpatch to only consider those signoff lines which start at the beginning of a line. So the following: Signed-off-by: Foo Bar <foo@bar.com> should not trigger. Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -623,9 +623,9 @@ def ovs_checkpatch_parse(text, filename):
|
||||
hunks = re.compile('^(---|\+\+\+) (\S+)')
|
||||
hunk_differences = re.compile(
|
||||
r'^@@ ([0-9-+]+),([0-9-+]+) ([0-9-+]+),([0-9-+]+) @@')
|
||||
is_signature = re.compile(r'((\s*Signed-off-by: )(.*))$',
|
||||
is_signature = re.compile(r'^(Signed-off-by: )(.*)$',
|
||||
re.I | re.M | re.S)
|
||||
is_co_author = re.compile(r'(\s*(Co-authored-by: )(.*))$',
|
||||
is_co_author = re.compile(r'^(Co-authored-by: )(.*)$',
|
||||
re.I | re.M | re.S)
|
||||
is_gerrit_change_id = re.compile(r'(\s*(change-id: )(.*))$',
|
||||
re.I | re.M | re.S)
|
||||
@@ -664,10 +664,10 @@ def ovs_checkpatch_parse(text, filename):
|
||||
print_error("Co-authored-by/Signed-off-by corruption")
|
||||
elif is_signature.match(line):
|
||||
m = is_signature.match(line)
|
||||
signatures.append(m.group(3))
|
||||
signatures.append(m.group(2))
|
||||
elif is_co_author.match(line):
|
||||
m = is_co_author.match(line)
|
||||
co_authors.append(m.group(3))
|
||||
co_authors.append(m.group(2))
|
||||
elif is_gerrit_change_id.match(line):
|
||||
print_error(
|
||||
"Remove Gerrit Change-Id's before submitting upstream.")
|
||||
|
Reference in New Issue
Block a user