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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 5 Mar 2015 16:13:36 -0300
From:	Lucas De Marchi <lucas.de.marchi@...il.com>
To:	Joe Perches <joe@...ches.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Andy Whitcroft <apw@...onical.com>,
	Kees Cook <keescook@...omium.org>,
	Masanari Iida <standby24x7@...il.com>,
	codespell@...glegroups.com, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] checkpatch: Add optional --codespell dictionary to find
 more typos

On Thu, Mar 5, 2015 at 3:52 PM, Joe Perches <joe@...ches.com> wrote:
> If a codespell dictionary exists, use it if desired.
> default is off, maybe it could be turned on later.
>
> codespell's dictionary format allows multiple possible corrections,
> ignore that for now and only use the first suggestion.

Most of them were particularly added to avoid wrong suggestions in
kernel code base (admittedly a long time ago)...
Wouldn't it be better to output the entire list of suggestions as
codespell the tool does?


>
> Also add \b to spelling test so that consecutive misspelled words
> are found properly.
>
> Signed-off-by: Joe Perches <joe@...ches.com>
> ---
>  scripts/checkpatch.pl | 38 ++++++++++++++++++++++++++++++++++----
>  1 file changed, 34 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index c061a63..6b79beb 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -47,6 +47,8 @@ my $ignore_perl_version = 0;
>  my $minimum_perl_version = 5.10.0;
>  my $min_conf_desc_length = 4;
>  my $spelling_file = "$D/spelling.txt";
> +my $codespell = 0;
> +my $codespellfile = "/usr/local/share/codespell/dictionary.txt";
>
>  sub help {
>         my ($exitcode) = @_;
> @@ -88,6 +90,9 @@ Options:
>                               file.  It's your fault if there's no backup or git
>    --ignore-perl-version      override checking of perl version.  expect
>                               runtime errors.
> +  --codespell                Use the codespell dictionary for spelling/typos
> +                             (default:/usr/local/share/codespell/dictionary.txt)
> +  --codespellfile            Use this codespell dictionary

I'm not a perl guru, but couldn't we have a single option like
--codespell / --codespell=FILE ?

Other than that,

Acked-By: Lucas De Marchi <lucas.de.marchi@...il.com>

-- 
Lucas De Marchi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ