[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH] Add new build target 'check-spelling'
From: |
Daniel P . Berrangé |
Subject: |
Re: [RFC PATCH] Add new build target 'check-spelling' |
Date: |
Mon, 31 Oct 2022 10:52:58 +0000 |
User-agent: |
Mutt/2.2.7 (2022-08-07) |
On Mon, Oct 31, 2022 at 11:44:48AM +0100, Stefan Weil via wrote:
> Am 31.10.22 um 08:52 schrieb Thomas Huth:
>
> > On 31/10/2022 08.43, Stefan Weil wrote:
> > > `make check-spelling` can now be used to get a list of spelling errors.
> > > It uses the latest version of codespell, a spell checker implemented
> > > in Python.
> > >
> > > Signed-off-by: Stefan Weil <sw@weilnetz.de>
> > > ---
> > >
> > > This RFC can already be used for manual tests, but still reports false
> > > positives, mostly because some variable names are interpreted as words.
> > > These words can either be ignored in the check, or in some cases the
> > > code
> > > might be changed to use different variable names.
> > >
> > > The check currently only skips a few directories and files, so for
> > > example
> > > checked out submodules are also checked.
> > >
> > > The rule can be extended to allow user provided ignore and skip lists,
> > > for example by introducing Makefile variables CODESPELL_SKIP=userfile
> > > or CODESPELL_IGNORE=userfile. A limited check could be implemented by
> > > providing a base directory CODESPELL_START=basedirectory, for example
> > > CODESPELL_START=docs.
> > >
> > > Regards,
> > > Stefan
> [...]
> > > I like the idea, but I think it's unlikely that we can make this
> > > work for the whole source tree any time soon. So maybe it makes more
> > > sense to start with some few directories first (e.g. docs/ ) and
> > > then the maintainers can opt-in by cleaning up their directories
> > > first and then by adding their directories to this target here?
> >
> > Thomas
>
>
> Even without implementing CODESPELL_START as described above, the script can
> already be used and integrated into CI scripts.
To get most value from CI, we strongly prefer the test to be a clear
pass/fail.
We do have some jobs that are marked non-gating, since they have
false failures and need manual inspection of results. The effect
is those jobs are largely ignored by everyone, so not really of
significant benefit.
So I'd agree with Thomas about starting with a config that can
get a clear pass/fail, and expanding from there if we can't get
the full-tree clean from the start.
> It shows that "roms" contributes by far the most typos. Omitting it would
> reduce the required time to 22 seconds and the number of typos found (2947
> lines in output) very much.
We should not look at 'roms' at all since it is just a place for
git submodulees, and build system integration. No interesting code
lives there.
> "capstone" (which has no entry in MAINTAINERS), "target" and "hw" also
> contribute more than 300 hits each, therefore cc'ing Richard.
We should completely ignoring 'capstone' and any other git submodule
as those are 3rd party codebases we don't maintain ourselves.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|