From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93CD7C388F9 for ; Sat, 31 Oct 2020 11:14:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E3EB20702 for ; Sat, 31 Oct 2020 11:14:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726871AbgJaLOj (ORCPT ); Sat, 31 Oct 2020 07:14:39 -0400 Received: from smtprelay0156.hostedemail.com ([216.40.44.156]:35294 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726314AbgJaLOi (ORCPT ); Sat, 31 Oct 2020 07:14:38 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay05.hostedemail.com (Postfix) with ESMTP id 9ED681802912D; Sat, 31 Oct 2020 11:14:37 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: lake80_4c091ad2729e X-Filterd-Recvd-Size: 3204 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf05.hostedemail.com (Postfix) with ESMTPA; Sat, 31 Oct 2020 11:14:36 +0000 (UTC) Message-ID: <8b6d8af8ef3e3499f647c5895c79891e0b26ac6c.camel@perches.com> Subject: Re: [PATCH] checkpatch: improve handling of email comments From: Joe Perches To: Dwaipayan Ray Cc: Lukas Bulwahn , linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel , Aditya Srivastava Date: Sat, 31 Oct 2020 04:14:35 -0700 In-Reply-To: References: <20201030090704.40533-1-dwaipayanray1@gmail.com> <9d5c8699f94481ab5bf2d37348199ca1d6343c8b.camel@perches.com> <8b9beccf81735f2e042447026a1043f8d21c2566.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2020-10-31 at 11:41 +0530, Dwaipayan Ray wrote: > Names which have must quote characters without any comments are > not warned about right now: > > D. Ray doesn't throw any warning, while > D. Ray (Dwai) does. I agree that a comment in parentheses after the name and before the email address is an issue that should be resolved. I think your proposed solution isn't great through. > Do you think this should be dealt separately from this patch? I think the cc: stable@(?:vger\.)?kernel.org with additional content on the same line should be separated from other email addresses with additional content on the same line. > Perhaps as another warning? Dunno. Try this git log grep: $ git log --format=email -100000 | \ grep -P '^(?:[\w\-]+-by:|cc:|CC:|Cc:)' | \ grep -v 'stable\@' | \ grep -P '\>.+' This finds any signature/cc line with content after an email address that end with a close angle bracket that doesn't go to the stable address. Think about what content after that close angle bracket should and shoud not be allowed. There are a few variants here: o comments (optional whitespace, followed by '#' or '[' or '(' or c89) o misuse of quote (around the whole name and address) o Odd commas after '>' likely from defective cut'n'paste use Then add this to the first grep to avoid the comments as above $ git log --format=email -100000 | \ grep -P '^(?:[\w\-]+-by:|cc:|CC:|Cc:)' | \ grep -v 'stable\@' | \ grep -P '\>.+' | \ grep -vP '\>\s*(?:\#|\(|/\*|\[)' Shouldn't all these be reported? Are they if your patch is applied? Then look at the addresses that do not have a close angle bracket and also have more content after the email address. $ git log --format=email -100000 | \ grep -P '^(?:[\w\-]+-by:|cc:|CC:|Cc:)' | \ grep -v 'stable@' | \ grep -vP '<[\w\.\@\+\-]+>' | \ grep -vP '[\w\.\@\+\-]+$' What of all of these should be reported? Happy testing...