qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] docs: rSTify the "SpellCheck" wiki


From: Kashyap Chamarthy
Subject: Re: [PATCH 1/3] docs: rSTify the "SpellCheck" wiki
Date: Wed, 22 Sep 2021 15:48:56 +0200

On Wed, Sep 22, 2021 at 02:10:43PM +0100, Peter Maydell wrote:
> On Wed, 22 Sept 2021 at 13:11, Kashyap Chamarthy <kchamart@redhat.com> wrote:

[...]

> > +If you installed codespell in your HOME directory, it can be called from
> > +the QEMU source directory like this::
> > +
> > +    ~/bin/codespell.py -d -r -s -x scripts/codespell.exclude -q 2 
> > ~/share/codespell/dictionary.txt
> > +
> > +``-x scripts/codespell.exclude`` excludes some known lines from the check
> > +and needs a file which is not yet committed.
> 
> This command doesn't actually work, because there is no
> scripts/codespell.exclude in the source tree. It also
> assumes you have a ~/share/codespell/dictionary.txt in your
> home directory.
> 
> I think Stefan proposed a patch adding the excludelist file to
> the source repository back when he wrote this wiki page a decade
> ago, but it did not get through code review.

Thanks for catching it.  I couldn't find the unmerged
'codespell.exclude' from my searches online.  I don't know if it still
makes sense to include such a file.  But regardless, 'codespell' is
useful on its own.  

In v2, I can nuke that command altogether, and link to the README of
upstream 'codespell':

    https://github.com/codespell-project/codespell

I'll also edit the paragraph that talks about installing the the tool in
$HOME directory -- it's no longer required; many major distros packaged
it.  At least Debian, Ubuntu, and Fedora do (as 'codespell'), and the
dictionary file gets installed under:

    $> rpm -ql codespell | grep dictionary
    /usr/lib/python3.9/site-packages/codespell_lib/data/dictionary.txt
    /usr/lib/python3.9/site-packages/codespell_lib/data/dictionary_code.txt
    
/usr/lib/python3.9/site-packages/codespell_lib/data/dictionary_en-GB_to_en-US.txt
    /usr/lib/python3.9/site-packages/codespell_lib/data/dictionary_informal.txt
    /usr/lib/python3.9/site-packages/codespell_lib/data/dictionary_names.txt
    /usr/lib/python3.9/site-packages/codespell_lib/data/dictionary_rare.txt
    /usr/lib/python3.9/site-packages/codespell_lib/data/dictionary_usage.txt

I'll also link to 'my-spell' from Alex Bennée, for Emacs users: 
https://github.com/stsquad/my-emacs-stuff/blob/master/my-spell.el

-- 
/kashyap




reply via email to

[Prev in Thread] Current Thread [Next in Thread]