History

checkpatch: add support for Assisted-by tag

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

Sasha Levin committed 8 months ago

Commit d1db4111 parent ecfad171 file · +10 −0Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+10−0
@@ -641,6 +641,7 @@ our $signature_tags = qr{(?xi: · 640 unmodified lines
641 Reviewed-by:|641 Reviewed-by:|
642 Reported-by:|642 Reported-by:|
643 Suggested-by:|643 Suggested-by:|
644 Assisted-by:|
644 To:|645 To:|
645 Cc:646 Cc:
646)};647)};
@@ -3105,6 +3106,15 @@ sub process { · 2458 unmodified lines
3105 }3106 }
3106 }3107 }
3107 3108
3109 # Assisted-by uses AGENT_NAME:MODEL_VERSION format, not email
3110 if ($sign_off =~ /^Assisted-by:/i) {
3111 if ($email !~ /^\S+:\S+/) {
3112 WARN("BAD_SIGN_OFF",
3113 "Assisted-by expects 'AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]' format\n" . $herecurr);
3114 }
3115 next;
3116 }
3117
3108 my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);3118 my ($email_name, $name_comment, $email_address, $comment) = parse_email($email);
3109 my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));3119 my $suggested_email = format_email(($email_name, $name_comment, $email_address, $comment));
3110 if ($suggested_email eq "") {3120 if ($suggested_email eq "") {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t