Commit Graph

6 Commits (main)

Author SHA1 Message Date
Isaiah Odhner 64fa5f63ff Cspell: adjust letter case in word list
This probably isn't worth managing!

On the bright side, I've vetted most of the word list now.
There's some stupid words in there, but with reasons, generally.
Often stupid reasons.
2024-01-30 00:06:18 -05:00
Isaiah Odhner 8ea4743f7f Rename local storage key variable 2024-01-29 23:49:31 -05:00
Isaiah Odhner 69540a07ca CSpell: accept spellings 2024-01-29 23:32:55 -05:00
Isaiah Odhner 12b49631ac CSpell: prune spelling dictionary using AHK script
Many of these accepted spellings were language names,
which I've since used `// spell-checker:disable` on,
some of which were also broken up wrong, such as "zyk" from "Język"
due to Unicode handling bugs in CSpell which have since been fixed.
Some of them are simply no longer present in the codebase,
and some of them are now included in the default dictionaries,
such as "allowfullscreen".
It also looks like CSpell now ignores spelling within filenames,
since "mobipaint" doesn't need to be in the word list.

To prune the accepted spellings, I cleared the word list,
then ran the "run-command-on-all-files.ahk" script I wrote for this,
then used set intersection of the list before and after to avoid
adding new spellings to the list.

However, some of the spellings that were added/removed were actually
just changes in letter case, such as "woah", which I manually lowercased
when adding it to the dictionary. This complicated things.
So I ended up generating a patch of the additions, and converting it to
a regexp that would find any of the added words:

    Airbrushbrush|APNG|atombgwht|bigfix|blackwhite|bresenham|browserconfig|colorbar|Colorstr|dectree|dont|Fieldsets|Fullscreen|greyscale|Hilight|ICNS|ifds|Iframes|iife|junkbot|Multiuser|Nevermind|Numpad|onestep|proch|proclabel|relh|reltopics|Repurposable|rgbas|Spirobrush|spritesheet|subh|Subwindows|Tesselator|topich|Tracedata|Tracky|typestyles|Uniquify|VAPORWAVE|Verts|vsns|Woah|XFCONF|العربي

and matched it against the cspell.json file before the removals,
case-insensitively, and noted the original letter casings, and then
edited the patch to use the original letter casings, where applicable:

    sed -e "s/APNG/apng/ ; s/bresenham/Bresenham/ ; s/Fieldsets/fieldsets/ ; s/Fullscreen/fullscreen/ ; s/Hilight/hilight/ ; s/ICNS/icns/ ; s/ifds/IFDs/ ; s/Iframes/iframes/ ; s/iife/IIFE/ ; s/junkbot/Junkbot/ ; s/Multiuser/multiuser/ ; s/Nevermind/nevermind/ ; s/Numpad/numpad/ ; s/Repurposable/repurposable/ ; s/rgbas/RGBAs/ ; s/Subwindows/subwindows/ ; s/Tesselator/tesselator/ ; s/Tracedata/tracedata/ ; s/Tracky/tracky/ ; s/Uniquify/uniquify/ ; s/VAPORWAVE/vaporwave/ ; s/Verts/verts/ ; s/vsns/VSNs/ ; s/Woah/woah/ ; s/XFCONF/xfconf/" -i additions.patch

and then applied the patch,
and then squashed everything, and did the set intersection again to
get the removals, followed by a checkout to get the additions.

In retrospect, I should've just hacked a pruning feature into cspell-cli
in which case I might've even been able to send a pull request.
2024-01-29 23:29:23 -05:00
Isaiah Odhner 07fad95eb1 CSpell: ignore files 2024-01-29 23:02:48 -05:00
Isaiah Odhner ef2393e79d CSpell: separate config file, and set up CLI 2024-01-29 23:02:10 -05:00