On Mon, 2023-04-03 at 19:17 -0700, Stephen Hemminger wrote:
> On Tue, 4 Apr 2023 00:08:30 +0100
> Luca Boccassi <bl...@debian.org> wrote:
> 
> > On Mon, 3 Apr 2023 at 15:47, Stephen Hemminger
> > <step...@networkplumber.org> wrote:
> > > 
> > > Shell script to find use of words that not be used.
> > > By default it prints matches.  The -q (quiet) option
> > > is used to just count. There is also -l option
> > > which lists lines matching (like grep -l).
> > > 
> > > Uses the word lists from Inclusive Naming Initiative
> > > see https://inclusivenaming.org/word-lists/
> > > 
> > > Examples:
> > >  $ ./devtools/check-naming-policy.sh -q
> > >  Total files: 37 errors, 90 warnings, 2 suggestions
> > > 
> > >  $ ./devtools/check-naming-policy.sh -q -l lib/eal
> > >  Total lines: 32 errors, 8 warnings, 0 suggestions
> > > 
> > > Add MAINTAINERS file entry for the new tool and resort
> > > the list files back into to alphabetic order
> > > 
> > > Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
> > > ---
> > > v2 - fix typo in words
> > >    - add subtree (pathspec) option
> > >    - update maintainers file (and fix alphabetic order)  
> > 
> > There's a json file on the website, how about downloading that on the
> > fly rather than storing a local copy that will go out of date?
> > https://inclusivenaming.org/word-lists/index.json
> 
> Ok, but that would mean using python and would also mean that terms like
> segreation which are not on the official list would not be caught

No need for python, it can be done with 'jq' very easily. Also there's
'segregate' which is close enough, it's tier 3. eg:

$ wget https://inclusivenaming.org/word-lists/index.json -q -O- | jq -r 
'.data[] | select ((.tier == "3")) | .term'
man-in-the-middle
Segregate

-- 
Kind regards,
Luca Boccassi

Reply via email to