utils: checkstyle.py: Validate SoB trailer against author
The TrailersChecker enforces the presence of a Signed-off-by tag in the trailer, but doesn't verify that the tag matches the commit's author. Add that verification, as required by the libcamera contribution process. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
fd130ef21b
commit
93506de63a
1 changed files with 3 additions and 2 deletions
|
@ -525,10 +525,11 @@ class TrailersChecker(CommitChecker):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if key == 'Signed-off-by':
|
if key == 'Signed-off-by':
|
||||||
sob_found = True
|
if value == commit.author:
|
||||||
|
sob_found = True
|
||||||
|
|
||||||
if not sob_found:
|
if not sob_found:
|
||||||
issues.append(CommitIssue(f"No valid 'Signed-off-by' trailer found, see Documentation/contributing.rst"))
|
issues.append(CommitIssue(f"No 'Signed-off-by' trailer matching author '{commit.author}', see Documentation/contributing.rst"))
|
||||||
|
|
||||||
return issues
|
return issues
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue