lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 01 Dec 2020 12:25:11 -0800
From:   Joe Perches <joe@...ches.com>
To:     Dwaipayan Ray <dwaipayanray1@...il.com>,
        Andrew Morton <akpm@...ux-foundation.org>
Cc:     linux-kernel-mentees@...ts.linuxfoundation.org,
        linux-kernel@...r.kernel.org, lukas.bulwahn@...il.com,
        Peilin Ye <yepeilin.cs@...il.com>
Subject: Re: [PATCH v3] checkpatch: fix TYPO_SPELLING check for words with
 apostrophe

On Tue, 2020-12-01 at 11:32 -0800, Joe Perches wrote:
> On Wed, 2020-12-02 at 00:37 +0530, Dwaipayan Ray wrote:
> > checkpatch reports a false TYPO_SPELLING warning for some words
> > containing an apostrophe when run with --codespell option.

Hey Andrew.  If Dwaipayan doesn't mind, can you update this
when you apply it to extend the length of the caret printed?

> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> > @@ -3106,15 +3106,18 @@ sub process {
> >  # Check for various typo / spelling mistakes
> >  		if (defined($misspellings) &&
> >  		    ($in_commit_log || $line =~ /^(?:\+|Subject:)/i)) {
> > -			while ($rawline =~ /(?:^|[^a-z@])($misspellings)(?:\b|$|[^a-z@])/gi) {
> > +			while ($rawline =~ /(?:^|[^\w\-'`])($misspellings)(?:[^\w\-'`]|$)/gi) {
> >  				my $typo = $1;
> > +				my $blank = copy_spacing($rawline);
> > +				my $ptr = substr($blank, 0, $-[1]) . "^";

Changing this to:

				my $ptr = substr($blank, 0, $-[1]) . "^" x length($typo);

makes the matched misspelling more obvious

Thanks, Joe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ