public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] checkpatch: teach checkpatch about the Assisted-by: tag for AI-assisted patches
@ 2026-03-02 14:36 Thomas Hellström
  2026-03-03 20:36 ` Niranjana Vishwanathapura
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Hellström @ 2026-03-02 14:36 UTC (permalink / raw)
  To: intel-xe
  Cc: Thomas Hellström, Andy Whitcroft, Joe Perches, Dwaipayan Ray,
	Lukas Bulwahn, linux-kernel

Documentation/process/coding-assistants.rst mandates the use of an
uses an "Agent:Model" notation rather than a name-and-email-address
pair, for example:

  Assisted-by: GitHub Copilot:claude-sonnet-4.6

checkpatch.pl currently emits false-positive errors and warnings for
this tag:

  WARNING: Non-standard signature: Assisted-by:
  ERROR: Unrecognized email address: 'GitHub Copilot:claude-sonnet-4.6'

Teach checkpatch about the tag:

- Add Assisted-by: to the $signature_tags regex so it is no longer
  flagged as a non-standard signature.
- Add Assisted-by: to the standard_signature_tags list in
  find_standard_signature() so that near-miss typos (e.g.
  'Assited-by:') suggest the correct spelling.
- Skip the email-address validation for Assisted-by: tags and instead
  validate that the value contains at least one colon separating the
  agent name from the model identifier.  Emit a BAD_SIGN_OFF warning
  if the notation does not conform.

Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>
Cc: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: linux-kernel@vger.kernel.org
Assisted-by: GitHub Copilot:claude-sonnet-4.6
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
---
 scripts/checkpatch.pl | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e56374662ff7..dd3327e8fa55 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -641,6 +641,7 @@ our $signature_tags = qr{(?xi:
 	Reviewed-by:|
 	Reported-by:|
 	Suggested-by:|
+	Assisted-by:|
 	To:|
 	Cc:
 )};
@@ -737,7 +738,7 @@ sub find_standard_signature {
 	my ($sign_off) = @_;
 	my @standard_signature_tags = (
 		'Signed-off-by:', 'Co-developed-by:', 'Acked-by:', 'Tested-by:',
-		'Reviewed-by:', 'Reported-by:', 'Suggested-by:'
+		'Reviewed-by:', 'Reported-by:', 'Suggested-by:', 'Assisted-by:'
 	);
 	foreach my $signature (@standard_signature_tags) {
 		return $signature if (get_edit_distance($sign_off, $signature) <= 2);
@@ -3107,7 +3108,15 @@ sub process {
 
 			my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
 			my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
-			if ($suggested_email eq "") {
+			# Assisted-by: uses "Agent:Model" notation without an email
+			# address, as mandated by Documentation/process/coding-assistants.rst.
+			# Skip email validation for this tag.
+			if ($sign_off =~ /^Assisted-by:$/i) {
+				if ($email !~ /\S+:\S+/) {
+					WARN("BAD_SIGN_OFF",
+					     "Assisted-by: should use 'Agent:Model' notation (e.g. 'GitHub Copilot:claude-sonnet-4.6')\n" . $herecurr);
+				}
+			} elsif ($suggested_email eq "") {
 				ERROR("BAD_SIGN_OFF",
 				      "Unrecognized email address: '$email'\n" . $herecurr);
 			} else {
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-04 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-02 14:36 [RFC PATCH] checkpatch: teach checkpatch about the Assisted-by: tag for AI-assisted patches Thomas Hellström
2026-03-03 20:36 ` Niranjana Vishwanathapura
2026-03-04 18:01   ` Thomas Hellström
2026-03-04 18:24     ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox