Patch Detail
Show a patch.
GET /api/patches/26439/?format=api
{ "id": 26439, "url": "https://patchwork.libcamera.org/api/patches/26439/?format=api", "web_url": "https://patchwork.libcamera.org/patch/26439/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260407135632.1810486-1-laurent.pinchart@ideasonboard.com>", "date": "2026-04-07T13:56:32", "name": "utils: checkstyle: Add license commit checker", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "014e7565a3baae91b128079cb2b6d5dc77613ec4", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/26439/mbox/", "series": [ { "id": 5872, "url": "https://patchwork.libcamera.org/api/series/5872/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5872", "date": "2026-04-07T13:56:32", "name": "utils: checkstyle: Add license commit checker", "version": 1, "mbox": "https://patchwork.libcamera.org/series/5872/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/26439/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/26439/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 BD3A7BEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 7 Apr 2026 13:56:36 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AA5C362D9C;\n\tTue, 7 Apr 2026 15:56:35 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7F1AE62846\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 7 Apr 2026 15:56:34 +0200 (CEST)", "from killaraus.ideasonboard.com\n\t(2001-14ba-703d-e500--2a1.rev.dnainternet.fi\n\t[IPv6:2001:14ba:703d:e500::2a1])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id C3184596\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 7 Apr 2026 15:55:06 +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=\"V55x+jFY\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1775570107;\n\tbh=XUAZTud8yfqxHD76lPROt7JTpHEsGrS1PxMxU7xVqjc=;\n\th=From:To:Subject:Date:From;\n\tb=V55x+jFYwvK6z5x0SYmwL9ePpRmQBT7FsZnQ5wV25CtDlTa3r7iH6qIiUpSwyWQT1\n\tr0nOf3kdI1FC7NS4GFCdHwcVVWQd1osbaQK1BV8yUXT1mLCFpCq1p1OrZjwEzZzeI1\n\tvkhBJCcOOInhQfn9Pyvaby8wXaCJYrckkGk5d2Ns=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Subject": "[PATCH] utils: checkstyle: Add license commit checker", "Date": "Tue, 7 Apr 2026 16:56:32 +0300", "Message-ID": "<20260407135632.1810486-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.52.0", "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": "Add a checker, based on the reuse tool, to detect files without a valid\nlicense. The tool is optional, the checker will be skipped when not\navailable.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\nI figured out that if we want this in CI, we should have it in\ncheckstyle too. In which case we could drop the license job from CI.\n---\n utils/checkstyle.py | 25 +++++++++++++++++++++++++\n 1 file changed, 25 insertions(+)\n\n\nbase-commit: 4b6c47bd6675c428c19ea76370f0301c24f23bf1", "diff": "diff --git a/utils/checkstyle.py b/utils/checkstyle.py\nindex fa1355c1738b..f1ba1ee0ed81 100755\n--- a/utils/checkstyle.py\n+++ b/utils/checkstyle.py\n@@ -453,6 +453,31 @@ class HeaderAddChecker(CommitChecker):\n return issues\n \n \n+class LicenseChecker(CommitChecker):\n+ commit_types = (Commit, StagedChanges, Amendment)\n+ dependencies = ('reuse',)\n+\n+ missing_license_regex = re.compile(r'^(.*): no license identifier$')\n+\n+ @classmethod\n+ def check(cls, commit, top_level):\n+ issues = []\n+\n+ ret = subprocess.run(['reuse', 'lint-file'] + commit.files('AR'),\n+ stdout=subprocess.PIPE)\n+\n+ for line in ret.stdout.decode('utf-8').splitlines():\n+ match = LicenseChecker.missing_license_regex.match(line)\n+ if not match:\n+ continue\n+\n+ filename = match.group(1)\n+ issue = CommitIssue(f'File {filename} has no license identifier')\n+ issues.append(issue)\n+\n+ return issues\n+\n+\n class TitleChecker(CommitChecker):\n commit_types = (Commit,)\n \n", "prefixes": [] }