From patchwork Thu Sep 3 14:51:50 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 28188 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 13115C334C for ; Thu, 3 Sep 2026 14:53:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2D465685EF; Thu, 3 Sep 2026 16:53:21 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Ae7i0bts"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D36D0685E3 for ; Thu, 3 Sep 2026 16:53:15 +0200 (CEST) Received: from ping.linuxembedded.co.uk (cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2B5DE2335; Thu, 3 Sep 2026 16:51:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1788447103; bh=jmdi3ngVdBTka9wzzZYcy3VOXMJi+IZ+OLJriRMT0gc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Ae7i0bts2j1S0ENUOJnSontZfWnmLBHhaoG5lfGOurwDKsAbiQa/vUMK9BncO/owj 3aymIyTK6tPPBxvKZRKJfRWM+Y79vKN+qn75hqM6Li6Wxnl5GFcpUWanOJCX1G13UV GC4gFfM/0BB3w9Dtv4bOg+9C8n/BW0g1kdULOY7o= From: Kieran Bingham Date: Thu, 03 Sep 2026 15:51:50 +0100 Subject: [PATCH 1/3] utils: checkstyle: Allow free form ABI/API trailers MIME-Version: 1.0 Message-Id: <20260903-kbingham-abi-trailers-v1-1-72ae051c912a@ideasonboard.com> References: <20260903-kbingham-abi-trailers-v1-0-72ae051c912a@ideasonboard.com> In-Reply-To: <20260903-kbingham-abi-trailers-v1-0-72ae051c912a@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Kieran Bingham X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1788447194; l=1747; i=kieran.bingham@ideasonboard.com; s=20260207; h=from:subject:message-id; bh=jmdi3ngVdBTka9wzzZYcy3VOXMJi+IZ+OLJriRMT0gc=; b=3IhVwDCevqx3vjeyaDTfPbAYbeKtktDgkkhM2EUyugypb09Cvy5STZynjEQpVM1DkMEpQJmmM WN5D0FpC9O+DX0nZ8zX3uGdZpN1A+n/Pm2s3WaRF6LNqo/WLAlCWYxW X-Developer-Key: i=kieran.bingham@ideasonboard.com; a=ed25519; pk=FVXKN7YuwHc6UtbRUeTMAmranfsQomA+vnilfglWdaY= X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The ABI and API trailers will allow contributors to document expected ABI and API breakage. The content may be extracted from the abi-compliance-checker tool and will not be specifically possible to validate precisely. The presences of an "ABI:" or "API:" key should be permitted by the tool. Extend the TrailersChecker to allow and support a trailer key which does not specify a validator, but where the Key itself is valid to exist in the Trailers section of a commit. Signed-off-by: Kieran Bingham --- utils/checkstyle.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/utils/checkstyle.py b/utils/checkstyle.py index f1ba1ee0ed81..b38d6831569b 100755 --- a/utils/checkstyle.py +++ b/utils/checkstyle.py @@ -575,6 +575,8 @@ class TrailersChecker(CommitChecker): 'Signed-off-by': email_regex, 'Suggested-by': email_regex, 'Tested-by': email_regex, + 'ABI': None, + 'API': None, } trailer_regex = re.compile(r'([A-Z][a-zA-Z-]*)\s*:\s*(.*)') @@ -593,11 +595,14 @@ class TrailersChecker(CommitChecker): key, value = match.groups() - validator = TrailersChecker.known_trailers.get(key) - if not validator: + if key not in TrailersChecker.known_trailers: issues.append(CommitIssue(f"Invalid commit trailer key '{key}'")) continue + validator = TrailersChecker.known_trailers[key] + if validator is None: + continue + if isinstance(validator, re.Pattern): valid = bool(validator.fullmatch(value)) else: