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 097F2C433DF for ; Sun, 18 Oct 2020 06:20:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B864F2087C for ; Sun, 18 Oct 2020 06:20:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726137AbgJRGU3 (ORCPT ); Sun, 18 Oct 2020 02:20:29 -0400 Received: from smtprelay0184.hostedemail.com ([216.40.44.184]:35668 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725275AbgJRGU2 (ORCPT ); Sun, 18 Oct 2020 02:20:28 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id BE8F718225E13; Sun, 18 Oct 2020 06:20:27 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: rake08_5a151d22722c X-Filterd-Recvd-Size: 2202 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf06.hostedemail.com (Postfix) with ESMTPA; Sun, 18 Oct 2020 06:20:26 +0000 (UTC) Message-ID: Subject: Re: [PATCH v5] checkpatch: add new exception to repeated word check From: Joe Perches To: Dwaipayan Ray Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel , Lukas Bulwahn Date: Sat, 17 Oct 2020 23:20:25 -0700 In-Reply-To: References: <20201017162732.152351-1-dwaipayanray1@gmail.com> <1ad9c5f49e10a192f0c6efb1116f3f0d31adce74.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.36.4-0ubuntu1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2020-10-17 at 22:19 +0530, Dwaipayan Ray wrote: > On Sat, Oct 17, 2020 at 10:03 PM Joe Perches wrote: > > On Sat, 2020-10-17 at 21:57 +0530, Dwaipayan Ray wrote: > > > Recently, commit 4f6ad8aa1eac ("checkpatch: move repeated word test") > > > moved the repeated word test to check for more file types. But after > > > this, if checkpatch.pl is run on MAINTAINERS, it generates several > > > new warnings of the type: > > > > NAK. > > > > Slow down and test before you send more patch versions. > > > > > + next if (index(" \t.,;?!", $end_char) == -1); > > > > what does this do? > > Um, it checks if end_char is not present in " \t.,;?!". > If end_char doesn't belong to this list, then the check shall > skip. That is the test will skip for "word word:", but will produce > a warning for "word word." or "word word?", etc. > > Shouldn't this itself be the case or am I perhaps going wrong > somewhere? No, you were right, I was being a numbskull. btw: I think this should set my $end_char = ' '; not '' so that if the last word on a line is a repeat the test still works.