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

Update codespell dictionary? #737

Closed
Delgan opened this issue Jun 7, 2023 · 6 comments · Fixed by #740
Closed

Update codespell dictionary? #737

Delgan opened this issue Jun 7, 2023 · 6 comments · Fixed by #740

Comments

@Delgan
Copy link
Contributor

Delgan commented Jun 7, 2023

Hi!

If I understand well, typos builds part of it's database using a dictionary sourced from codespell: https://github.com/crate-ci/typos/tree/master/crates/codespell-dict

However, this dictionary doesn't seem to have been updated for 2 years. Is there any reason for this?
Codespell has added over 10 000 fixes to its dictionary since then.

@Delgan
Copy link
Contributor Author

Delgan commented Jun 7, 2023

Hum... There's something else I must be missing actually.

I expected "usefull" to be replaced with "useful".
This is listed here for example:

However, this is not detected as a spelling mistake.
Why that? Are others dictionaries actually used by typos?
Or maybe it's because "usefull" is actually used as a correction suggestion here, thus disabling the typo?

@epage
Copy link
Collaborator

epage commented Jun 7, 2023

Our primary dictionary is in typos-dict. The others exist mostly for comparison purposes.

@Delgan
Copy link
Contributor Author

Delgan commented Jun 7, 2023

Ok I understand, thank you!

I've compared the two tools on my codebase, and although typos finds more errors than codespell, the latter also finds interesting errors that are unfortunately overlooked by typos.

I can imagine that maintaining such a list is very complicated and can hardly be exhaustive.
Had you considered merging the various dictionaries to cover more possible typos?

@szepeviktor
Copy link
Contributor

szepeviktor commented Jun 8, 2023

codespell works with regular expressions and does not chop up variable names, e.g. MissspellingChecker

@Delgan
Copy link
Contributor Author

Delgan commented Jun 8, 2023

@szepeviktor Yes, I know, I prefer typos for this reason. I'm mainly talking about dictionary data that could be reused (without needing to change the implementation).

@Delgan
Copy link
Contributor Author

Delgan commented Jun 8, 2023

Thanks for the update!

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

Successfully merging a pull request may close this issue.

3 participants