Yocto Project Documentation
 help / color / mirror / Atom feed
From: Paul Barker <paul@pbarker.dev>
To: Niko Mauno <niko.mauno@vaisala.com>, docs@lists.yoctoproject.org
Cc: antonin.godard@bootlin.com, quentin.schulz@cherry.de
Subject: Re: [docs] [PATCH v3 5/5] tools: Add check-confusables pre-commit hook
Date: Tue, 28 Jul 2026 17:47:44 +0100	[thread overview]
Message-ID: <d7184479bd0ea8364f7890eb4054bd2cb67200cc.camel@pbarker.dev> (raw)
In-Reply-To: <659e38bc-3cb9-453f-919a-40a134bdace4@vaisala.com>

[-- Attachment #1: Type: text/plain, Size: 2526 bytes --]

On Tue, 2026-07-28 at 19:40 +0300, Niko Mauno wrote:
> 
> On 7/28/26 1:41 PM, Paul Barker wrote:
> > On Tue, 2026-07-28 at 12:07 +0300, Niko Mauno via lists.yoctoproject.org
> > wrote:
> > > From: Niko Mauno <niko.mauno@vaisala.com>
> > > 
> > > Add a check-confusables script, in the same fashion as
> > > check-glossaries, that scans the documentation .rst sources for
> > > non-ASCII "confusable" characters (curly quotes, en/em dashes,
> > > non-breaking and zero-width spaces, etc.) and reports each occurrence
> > > with its location and suggested ASCII replacement, exiting non-zero if
> > > any are found. This guards against the class of breakage fixed in the
> > > preceding commit, e.g. curly quotes causing recipe ParseErrors.
> > > 
> > > Legitimate non-ASCII such as box-drawing characters used in directory
> > > trees, accented letters in contributor names and CJK characters are
> > > intentionally left untouched. No-break spaces are likewise tolerated
> > > on lines containing box-drawing characters, since the tree command
> > > emits them as indentation in directory listings.
> > > 
> > > Wire it up both as a local pre-commit hook, which checks the changed
> > > files, and in the Makefile "checks" target, which scans the whole
> > > tree, alongside check-glossaries.
> > > 
> > > Suggested-by: Quentin Schulz <quentin.schulz@cherry.de>
> > > Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
> > > Signed-off-by: Niko Mauno <niko.mauno@vaisala.com>
> > 
> > Hi Niko,
> > 
> > Are there any existing tools we can use instead of implementing this
> > ourselves? Perhaps https://pypi.org/project/confusables/ ?
> > 
> > Some comments below if we do want to merge our own implementation of
> > this...
> > 
> 
> Hi Paul,
> 
> Thank you for these observations. It seems that confusables (and its 
> alternatives) would not directly resolve the exact problems that 
> check-confusables script addresses, therefore retained the 
> dependency-free approach in v4 which I just submitted. It addresses the 
> missing copyright/license header, and changes the literal glyphs to \u 
> escape sequences.
> 
> Also the topmost commit message now contains a segment explaining why 
> the "own short table" is used instead of depending on a 3rd party package.

Hi Niko,

Thanks for following up. If existing Python packages don't meet our
needs then I agree it makes sense to carry our own curated list.

Best regards,

-- 
Paul Barker


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

      reply	other threads:[~2026-07-28 16:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  9:07 [PATCH v3 0/5] documentation: minor fixes, plus a confusables check niko.mauno
2026-07-28  9:07 ` [PATCH v3 1/5] ref-manual: Fix occurrences of omitted space with :prepend niko.mauno
2026-07-28  9:07 ` [PATCH v3 2/5] ref-manual: Prune superfluous space with :append niko.mauno
2026-07-28  9:07 ` [PATCH v3 3/5] dev-manual: Fix missing whitespace around '=' operator niko.mauno
2026-07-28  9:07 ` [PATCH v3 4/5] documentation: Replace non-ASCII confusable characters with ASCII niko.mauno
2026-07-28  9:07 ` [PATCH v3 5/5] tools: Add check-confusables pre-commit hook niko.mauno
2026-07-28 10:41   ` [docs] " Paul Barker
2026-07-28 16:40     ` Niko Mauno
2026-07-28 16:47       ` Paul Barker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7184479bd0ea8364f7890eb4054bd2cb67200cc.camel@pbarker.dev \
    --to=paul@pbarker.dev \
    --cc=antonin.godard@bootlin.com \
    --cc=docs@lists.yoctoproject.org \
    --cc=niko.mauno@vaisala.com \
    --cc=quentin.schulz@cherry.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox