[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2203150803540.2907@hadrien>
Date: Tue, 15 Mar 2022 08:11:30 +0100 (CET)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Joe Perches <joe@...ches.com>
cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 00/30] fix typos in comments
On Mon, 14 Mar 2022, Joe Perches wrote:
> Care to describe _how_ coccinelle was helpful in finding
> these typos in comments?
First, Coccinelle can bind a metavariable to the comments before, within
and after anohter kind of term. So I collected the comments before,
within, and after statements and declarations.
Second, I also used Coccinelle to collect all of the identifiers
referenced in the same file, and discarded all of these words from
consideration.
Otherwise, it's the python library enchant for a dictionary, and some
hacks to reduce the number of false positives, including dropping words
that occur multiple times. The results are still maybe 90% false
positives, though.
The semantic patch is attached. It gives around 30K results for the
current linux-next.
julia
View attachment "nlp2.py" of type "text/x-python" (255 bytes)
View attachment "checkspell.cocci" of type "text/plain" (2839 bytes)
Powered by blists - more mailing lists