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 D43F2C63777 for ; Mon, 30 Nov 2020 19:38:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C97820709 for ; Mon, 30 Nov 2020 19:38:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729923AbgK3TiO (ORCPT ); Mon, 30 Nov 2020 14:38:14 -0500 Received: from smtprelay0074.hostedemail.com ([216.40.44.74]:35884 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728846AbgK3TiO (ORCPT ); Mon, 30 Nov 2020 14:38:14 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay07.hostedemail.com (Postfix) with ESMTP id 58E7E181D3039; Mon, 30 Nov 2020 19:37:33 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: jar12_59094b1273a4 X-Filterd-Recvd-Size: 2194 Received: from XPS-9350.home (unknown [47.151.128.180]) (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA; Mon, 30 Nov 2020 19:37:32 +0000 (UTC) Message-ID: Subject: Re: [PATCH] checkpatch: fix TYPO_SPELLING check for words with apostrophe From: Joe Perches To: Dwaipayan Ray Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel , Lukas Bulwahn , Peilin Ye Date: Mon, 30 Nov 2020 11:37:30 -0800 In-Reply-To: References: <20201130144515.8320-1-dwaipayanray1@gmail.com> <070109a56817288562a91dfeec74359eb948234e.camel@perches.com> <40b6e1fa9fc638a7e755f7e91f401b6019fee2fa.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: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2020-11-30 at 23:56 +0530, Dwaipayan Ray wrote: > Thanks, this does resolve the original problem, but again the following > line throws 0 warnings: > > "zeebra" ther, yourr. > > Any punctuation separators are ignored :( > >  (?:^|\s)($misspellings)(?=[\s\.\,\:\;\"\?\!]|$) > > Would this be acceptable rather? But again this doesn't > handle [therr] or (therr). No idea. What does codespell use for its regex? Maybe that should be used. Maybe all the added lines should be collected and codespell should be called on those lines instead. Try other options and check if the overall cpu/wall clock use is reduced. Adding codespell's dictionary was kind of a 'nice to have' option and it's not likely that it matters a lot if it's perfect or not. My presumption is that it's not frequently used, but hey, who knows.