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

[whishlist] config/cli option to specify words min. length #1079

Open
h-mathias opened this issue Aug 21, 2024 · 4 comments
Open

[whishlist] config/cli option to specify words min. length #1079

h-mathias opened this issue Aug 21, 2024 · 4 comments

Comments

@h-mathias
Copy link

It can currently be solved with adding ^[a-zA-Z]{1,3}$ to extend-ignore-words-re but it is less efficient than just comparing the length of the word.

@epage
Copy link
Collaborator

epage commented Aug 21, 2024

If we did this, it would be config only. We intentionally limit what capabilities we provide on the CLI as configuration like this is intended to be project configuration rather than run configuration.

Could you go into more detail on what problem you are running into with short words that you don't just need a short-word filter but you need it more efficient than what extend-ignore-words-re provides?

@h-mathias
Copy link
Author

It is mainly about words with 2 or 3 characters which are often abbreviations or acronyms. Some false positives findings ba, fo, seh, mis, ue, nd.
cspell for examples has minWordLength.
It would be a convenience option but as said it also works with extend-ignore-words-re so feel free to close this issue.

@epage
Copy link
Collaborator

epage commented Aug 23, 2024

From cspell's docs

minWordLength - defaults to 4 - the minimum length of a word before it is checked.

Not quickly finding when that was introduced to see all of the motivation. Unsure what it is about the code bases I work on that this hasn't really been a problem which biases me towards leaving this to users via regex.

@cmdcolin
Copy link

cmdcolin commented Sep 10, 2024

random personal feeling: i generally find longer words have much more signal to noise

rather than a threshold, i have considered making a user interface that consumes the output of typos-cli to sort it long to short, and even make a TUI to approve a fix or "add to ignorelist". just dreaming though:)

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

3 participants