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=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 4B9E6C388F7 for ; Tue, 3 Nov 2020 07:28:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F30CE22226 for ; Tue, 3 Nov 2020 07:28:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727875AbgKCH2J (ORCPT ); Tue, 3 Nov 2020 02:28:09 -0500 Received: from smtprelay0003.hostedemail.com ([216.40.44.3]:59148 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725968AbgKCH2J (ORCPT ); Tue, 3 Nov 2020 02:28:09 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 88E3F1730877; Tue, 3 Nov 2020 07:28:08 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: blade17_1707ebf272b6 X-Filterd-Recvd-Size: 2792 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA; Tue, 3 Nov 2020 07:28:07 +0000 (UTC) Message-ID: Subject: Re: [PATCH v2] checkpatch: improve email parsing From: Joe Perches To: Dwaipayan Ray Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel , Lukas Bulwahn , Aditya Srivastava Date: Mon, 02 Nov 2020 23:28:06 -0800 In-Reply-To: References: <20201103054810.21978-1-dwaipayanray1@gmail.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 Tue, 2020-11-03 at 11:28 +0530, Dwaipayan Ray wrote: > On Tue, Nov 3, 2020 at 11:18 AM Dwaipayan Ray wrote: > > > > checkpatch doesn't report warnings for many common mistakes > > in emails. Some of which are trailing commas and incorrect > > use of email comments. > > > > At the same time several false positives are reported due to > > incorrect handling of mail comments. The most common of which > > is due to the pattern: > > > > # X.X > > > > Improve email parsing mechanism in checkpatch. > > > > What is added: > > > > - Support for multiple name/address comments. > > - Improved handling of quoted names. > > - Sanitize improperly formatted comments. > > - Sanitize trailing semicolon or dot after email. [] > What do you think? Should warnings for the names which should > be quoted be reported considering this result? Clearly the quote suggestion is unnecessary. I think that "cc: stable@(?:vger\.)?kernel\.org" should be treated differently from other forms of invalid/odd address lines. My suggestion is that the case insensitive form of Cc: stable@vger.kernel.org or only another similar case insensitive forms with a # comment separator like Cc: # some comment be acceptable for stable. All other forms with stable@ should emit some message. And other -by: and cc: addresses should only have a form like Signed-off-by: "Full.Name" (possible comment) or Signed-off-by: Full Name (possible comment) etc.. and any additional content after .tld in the email address be flagged with some message like "unexpected content after email address" rather than "might be better as". What do you think best?