[PATCH 2/2] utils: checkstyle.py: Validate SoB trailer against author

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Aug 5 19:48:07 CEST 2024


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 at ideasonboard.com>
---
 utils/checkstyle.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/utils/checkstyle.py b/utils/checkstyle.py
index 1eeb3809f7fe..722b59920062 100755
--- a/utils/checkstyle.py
+++ b/utils/checkstyle.py
@@ -524,10 +524,11 @@ class TrailersChecker(CommitChecker):
                 continue
 
             if key == 'Signed-off-by':
-                sob_found = True
+                if value == commit.author:
+                    sob_found = True
 
         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
 
-- 
Regards,

Laurent Pinchart



More information about the libcamera-devel mailing list