From patchwork Fri May 1 11:00:18 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2269 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633337; bh=Z82JtSnFdke3Q+a5W55mpxAYnXfSKwNrBZ6y+lKrHyA=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=iM8rXoOESBjmbLXcsCBX/erViyAUrLaT3bxbgwIXEQrzCl1cM01j2MFbIl1nPOXKl 8KpVgzCexB9butmZr+gLikp6jQ8scBXpM9JEQdaZzqgf7Xe4recBtaNe4Tj+GcoWEX WHw2q++4mXmGaN0SxX0RMULtpRUp6u4UmAeT1hb4= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id A0E616A837 for ; Fri, 1 May 2026 05:02:17 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id aMtx8Z1DdWG8 for ; Fri, 1 May 2026 05:02:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633337; bh=Z82JtSnFdke3Q+a5W55mpxAYnXfSKwNrBZ6y+lKrHyA=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=iM8rXoOESBjmbLXcsCBX/erViyAUrLaT3bxbgwIXEQrzCl1cM01j2MFbIl1nPOXKl 8KpVgzCexB9butmZr+gLikp6jQ8scBXpM9JEQdaZzqgf7Xe4recBtaNe4Tj+GcoWEX WHw2q++4mXmGaN0SxX0RMULtpRUp6u4UmAeT1hb4= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 90C336A82E for ; Fri, 1 May 2026 05:02:17 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633335; bh=3BoLaK2E8TEV4rNeap95a0ht2Uu4ZcmbnmCF5RmzDqE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AcZMKoxs6biUFKaFVnJ8FINPQRoXgeTybyclYkZGesAWASe96qbcXcSK4Nuouj0Ol /QI0LexK8WNk3Ot8Ly16IECphdJECnJ68yEZNDFzsI3FQrHt1El1MhF6gjr7gJ0vv6 k7Y/f3ra3nZiovjkaR2bmc65JiJ5GYblpKBahwsQ= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 4D6106A82E; Fri, 1 May 2026 05:02:15 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 7wmC3rZuCU5u; Fri, 1 May 2026 05:02:15 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1777633327; bh=k7XL7QqwOUcK1c7AxIHN/ol+2L0QpBLChclHO+5Swug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fx5sHr1BRZDSpma6aNZ95hJ8z3PXfxvPd/3VHYkKlji7Czv7grFUD78vabLg4sBn5 3XhJiVdm2w0WGBtC80G+T9wMnFd11h0XVhqSTWqs+ziBx3Clhi4m6Gzd93wS4GUXZn OCHb7fNILRq2U2mp7KpgBd/zTTGP7NVxiK0pzkrQ= Received: from u-boot.org (unknown [174.51.25.52]) by mail.u-boot.org (Postfix) with ESMTPSA id 665166A7AF; Fri, 1 May 2026 05:02:07 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 1 May 2026 05:00:18 -0600 Message-ID: <20260501110040.1874719-27-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260501110040.1874719-1-sjg@u-boot.org> References: <20260501110040.1874719-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: TSJEADEE7P7SA6DV6BOKF4PRURUM76QD X-Message-ID-Hash: TSJEADEE7P7SA6DV6BOKF4PRURUM76QD X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 26/29] patman: Use single quotes for all quoted tokens in reviews List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The review prompt told the agent to quote string literals with double quotes, which ends up looking out of place next to the surrounding single-quoted identifiers (e.g. a review would say "handosff" next to 'my_var'). Use single quotes for everything except bare function names (which keep their parentheses). Add a cleanup pass that rewrites short double-quoted tokens to single quotes, leaving longer phrases (which are more likely to be intentional quotations) alone. Signed-off-by: Simon Glass --- tools/patman/review.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) -- 2.43.0 diff --git a/tools/patman/review.py b/tools/patman/review.py index eb8a3da63b3..054d18c6d80 100644 --- a/tools/patman/review.py +++ b/tools/patman/review.py @@ -401,9 +401,9 @@ Rules: possible to make the point. Avoid restating what the code does; - NEVER use backticks — this is plain-text email, not markdown. For functions, always use parentheses with no quotes: malloc() not - 'malloc()' or `malloc`. For other identifiers (variables, struct - names, filenames) use single quotes: 'my_var' not "my_var", unless - it is a string literal (use double quotes for strings). Do not + 'malloc()' or `malloc`. For all other quoting (identifiers, + filenames, string literals, misspelled words, etc.) use single + quotes: 'my_var' and 'handoff' not "my_var" or "handoff". Do not quote identifiers that are obviously code (e.g. CONFIG_FOO) - Never put a period directly after a code identifier — rephrase, omit the period, or use an em dash to start the next clause @@ -505,9 +505,9 @@ VERDICT: changes_needed Rules: - NEVER use backticks — this is plain-text email, not markdown. For functions, always use parentheses with no quotes: malloc() not - 'malloc()' or `malloc`. For other identifiers (variables, struct - names, filenames) use single quotes: 'my_var' not "my_var", unless - it is a string literal (use double quotes for strings). Do not + 'malloc()' or `malloc`. For all other quoting (identifiers, + filenames, string literals, misspelled words, etc.) use single + quotes: 'my_var' and 'handoff' not "my_var" or "handoff". Do not quote identifiers that are obviously code (e.g. CONFIG_FOO) - Never put a period directly after a code identifier — rephrase, omit the period, or use an em dash to start the next clause @@ -759,6 +759,14 @@ def cleanup_review_text(text): # Remove double quotes around function references: "func()" -> func() text = re.sub(r'"(\w+\(\))"', r'\1', text) + # Convert double-quoted short tokens to single quotes: + # "handoff" -> 'handoff'. Leave longer quoted text (full sentences + # or phrases) alone, since they may be intentional quotations. + text = re.sub(r'"([^"\n]{1,40})"', + lambda m: f"'{m.group(1)}'" + if ' ' not in m.group(1) else m.group(0), + text) + return text