[PATCH] checkpatch: add support for Assisted-by tag

Sasha Levin posted 1 patch 3 weeks, 6 days ago
There is a newer version of this series
scripts/checkpatch.pl | 9 +++++++++
1 file changed, 9 insertions(+)
[PATCH] checkpatch: add support for Assisted-by tag
Posted by Sasha Levin 3 weeks, 6 days ago
The Assisted-by tag was introduced in Documentation/process/coding-assistants.rst
for attributing AI tool contributions to kernel patches. However, checkpatch.pl
did not recognize this tag, causing two issues:

  WARNING: Non-standard signature: Assisted-by:
  ERROR: Unrecognized email address: 'AGENT_NAME:MODEL_VERSION'

Fix this by:
1. Adding Assisted-by to the recognized $signature_tags list
2. Skipping email validation for Assisted-by lines since they use the
   AGENT_NAME:MODEL_VERSION format instead of an email address
3. Warning when the Assisted-by value doesn't match the expected format

Reported-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 scripts/checkpatch.pl | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e56374662ff79..70ea466390771 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:
 )};
@@ -3105,6 +3106,13 @@ sub process {
 				}
 			}
 
+			# Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
+			if ($sign_off =~ /^Assisted-by:/i) {
+				if ($email !~ /^\S+:\S+/) {
+					WARN("BAD_SIGN_OFF",
+					     "Assisted-by: expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
+				}
+			} else {
 			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 "") {
@@ -3189,6 +3197,7 @@ sub process {
 					}
 				}
 			}
+			}
 
 # Check for duplicate signatures
 			my $sig_nospace = $line;
-- 
2.51.0
Re: [PATCH] checkpatch: add support for Assisted-by tag
Posted by Joe Perches 3 weeks, 6 days ago
On 2026-03-11 08:20, Sasha Levin wrote:
> The Assisted-by tag was introduced in 
> Documentation/process/coding-assistants.rst
> for attributing AI tool contributions to kernel patches. However, 
> checkpatch.pl
> did not recognize this tag, causing two issues:
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -3105,6 +3106,13 @@ sub process {
>  				}
>  			}
> 
> +			# Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
> +			if ($sign_off =~ /^Assisted-by:/i) {
> +				if ($email !~ /^\S+:\S+/) {
> +					WARN("BAD_SIGN_OFF",
> +					     "Assisted-by: expects 'AGENT_NAME:MODEL_VERSION [TOOL1] 
> [TOOL2]' format\n" . $herecurr);
> +				}

I believe you could use next instead of this odd indentation avoidance.
Re: [PATCH] checkpatch: add support for Assisted-by tag
Posted by Sasha Levin 3 weeks, 6 days ago
On Wed, Mar 11, 2026 at 08:33:26AM -0700, Joe Perches wrote:
>On 2026-03-11 08:20, Sasha Levin wrote:
>>The Assisted-by tag was introduced in 
>>Documentation/process/coding-assistants.rst
>>for attributing AI tool contributions to kernel patches. However, 
>>checkpatch.pl
>>did not recognize this tag, causing two issues:
>[]
>>diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>[]
>>@@ -3105,6 +3106,13 @@ sub process {
>> 				}
>> 			}
>>
>>+			# Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
>>+			if ($sign_off =~ /^Assisted-by:/i) {
>>+				if ($email !~ /^\S+:\S+/) {
>>+					WARN("BAD_SIGN_OFF",
>>+					     "Assisted-by: expects 'AGENT_NAME:MODEL_VERSION [TOOL1] 
>>[TOOL2]' format\n" . $herecurr);
>>+				}
>
>I believe you could use next instead of this odd indentation avoidance.

Let me figure it out. My perl-fu is... questionable.

-- 
Thanks,
Sasha
[PATCH v2] checkpatch: add support for Assisted-by tag
Posted by Sasha Levin 3 weeks, 5 days ago
The Assisted-by tag was introduced in
Documentation/process/coding-assistants.rst for attributing AI tool
contributions to kernel patches. However, checkpatch.pl did not
recognize this tag, causing two issues:

  WARNING: Non-standard signature: Assisted-by:
  ERROR: Unrecognized email address: 'AGENT_NAME:MODEL_VERSION'

Fix this by:
1. Adding Assisted-by to the recognized $signature_tags list
2. Skipping email validation for Assisted-by lines since they use the
   AGENT_NAME:MODEL_VERSION format instead of an email address
3. Warning when the Assisted-by value doesn't match the expected format

Reported-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
Changes from v1:
 - Use next instead of wrapping the email validation block in an else
   clause, as suggested by Joe Perches.

 scripts/checkpatch.pl | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e56374662ff79..27a43a4d9c438 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:
 )};
@@ -3105,6 +3106,15 @@ sub process {
 				}
 			}
 
+			# Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
+			if ($sign_off =~ /^Assisted-by:/i) {
+				if ($email !~ /^\S+:\S+/) {
+					WARN("BAD_SIGN_OFF",
+					     "Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
+				}
+				next;
+			}
+
 			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 "") {
-- 
2.51.0
Re: [PATCH v2] checkpatch: add support for Assisted-by tag
Posted by Joe Perches 3 weeks, 4 days ago
On Wed, 2026-03-11 at 17:58 -0400, Sasha Levin wrote:
> The Assisted-by tag was introduced in
> Documentation/process/coding-assistants.rst for attributing AI tool
> contributions to kernel patches. However, checkpatch.pl did not
> recognize this tag, causing two issues:
> 
>   WARNING: Non-standard signature: Assisted-by:
>   ERROR: Unrecognized email address: 'AGENT_NAME:MODEL_VERSION'

Acked-by: Joe Perches <joe@perches.com>

> diff --git 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:
>  )};
> @@ -3105,6 +3106,15 @@ sub process {
>  				}
>  			}
>  
> +			# Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
> +			if ($sign_off =~ /^Assisted-by:/i) {
> +				if ($email !~ /^\S+:\S+/) {
> +					WARN("BAD_SIGN_OFF",
> +					     "Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
> +				}
> +				next;
> +			}
> +
>  			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 "") {
>