{"id":20756,"url":"https://patchwork.libcamera.org/api/1.1/patches/20756/?format=json","web_url":"https://patchwork.libcamera.org/patch/20756/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20240804120656.29935-1-laurent.pinchart@ideasonboard.com>","date":"2024-08-04T12:06:56","name":"utils: checkstyle.py: Warn when no valid Signed-off-by line is found","commit_ref":"8af95d6854889dc66746429ccf8888e3a81f6baf","pull_url":null,"state":"accepted","archived":false,"hash":"7745951cc15cc5bfd8483b2e5a358d29ba3e225d","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/20756/mbox/","series":[{"id":4480,"url":"https://patchwork.libcamera.org/api/1.1/series/4480/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=4480","date":"2024-08-04T12:06:56","name":"utils: checkstyle.py: Warn when no valid Signed-off-by line is found","version":1,"mbox":"https://patchwork.libcamera.org/series/4480/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/20756/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/20756/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id AF912C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  4 Aug 2024 12:07:21 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id CBBC76192D;\n\tSun,  4 Aug 2024 14:07:20 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 85EA26192D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  4 Aug 2024 14:07:18 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B323F1BA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  4 Aug 2024 14:06:27 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"bOPu6SvW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1722773187;\n\tbh=f60ZcWrHGu7hkN+STo9UQOceVXeJKDtF2u4whwVtWlc=;\n\th=From:To:Subject:Date:From;\n\tb=bOPu6SvWFouGQtqG6DzCtZcDgHVUruDnarwdtM0ek6nXshBEP4NxPinVo6oZJHMCW\n\tsLJatcN+eKVfqz4TqqfinwzTHzLhHKUjgEHJH2dzsKw7Iqynm3aMtKwNLW+0YS8jLX\n\tHo9lGOWh7anVZ6uI55HE0M7P+xGey5ZzpF6adYKg=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Subject":"[PATCH] utils: checkstyle.py: Warn when no valid Signed-off-by line\n\tis found","Date":"Sun,  4 Aug 2024 15:06:56 +0300","Message-ID":"<20240804120656.29935-1-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.44.2","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"All commits to libcamera must include a Signed-off-by line, and that\nrule is enforced through git hooks and CI. This however doesn't prevent\npatches from being submitted without an SoB tag, as noticed multiple\ntimes in the past. Extend the checkstyle.py trailer checker to issue a\nwarning when the SoB line is missing to try and improve the situation.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n utils/checkstyle.py | 8 ++++++++\n 1 file changed, 8 insertions(+)\n\n\nbase-commit: 19bbca3c0b376ba0183f5db53472c8c46cd402b5","diff":"diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex 4185c39ac811..7d480bdf4a2f 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -493,6 +493,8 @@ class TrailersChecker(CommitChecker):\n     def check(cls, commit, top_level):\n         issues = []\n \n+        sob_found = False\n+\n         for trailer in commit.trailers:\n             match = TrailersChecker.trailer_regex.fullmatch(trailer)\n             if not match:\n@@ -515,6 +517,12 @@ class TrailersChecker(CommitChecker):\n                 issues.append(CommitIssue(f\"Malformed value '{value}' for commit trailer '{key}'\"))\n                 continue\n \n+            if key == 'Signed-off-by':\n+                sob_found = True\n+\n+        if not sob_found:\n+            issues.append(CommitIssue(f\"No valid 'Signed-off-by' trailer found, see Documentation/contributing.rst\"))\n+\n         return issues\n \n \n","prefixes":[]}