Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make rare words demand user interaction and have themselves given as a choice #2766

Open
yarikoptic opened this issue Mar 3, 2023 · 1 comment

Comments

@yarikoptic
Copy link
Contributor

"Inspired" by #2765 where I suggested to remove whet from dictionary_rare. A valid comment from @DimitriPapadopoulos was

The idea is that you don't let codespell fix typos blindly.

which I agree with but even with non-blind review of the changes (e.g. in >100 files) it is hard to spot false positives. In case of rare, but legit words, one way to accent on their legitimacy but "oddity" is to list them as choices as well. That would 1. force user interaction, 2. ensure that correct original form is given as a choice (although then user also should add that skip to the config file for future runs).

Without such explicit listing and interaction in cases with words which have only 1 other correct choice, such as wit - if someone runs codespell -w -- they would be applied automagically without interaction

❯ cat SAMPLE.md
Whet my appetite and train my wit.

❯ codespell SAMPLE.md
SAMPLE.md:1: Whet ==> When, What, Wet
SAMPLE.md:1: wit ==> with

so in the case of whet I at least avoid automated fixing since have multiple choices, but in case of wit, if apply automagic fixing -- it would be fixed into incorrect with.

@yarikoptic yarikoptic changed the title make rare demanding user interaction and have themselves given as a choice? make rare words demand user interaction and have themselves given as a choice Mar 3, 2023
@no-identd
Copy link

Cf. #1193 (implicit via #2765)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants