codespell-project / codespell

check code for common misspellings
GNU General Public License v2.0
1.9k stars 466 forks source link

Undo `re-use`/`re-using` addition: it's not necessarily a typo #3521

Open corneliusroemer opened 2 months ago

corneliusroemer commented 2 months ago

I'm just running codespell on all of the python peps. I switched to main just now, see #3520

I notice that I get a lot of re-using/re-use typos. This isn't really a typo that's severe, it should maybe be part of an extra dictionary of "opinionated" rewrites. You don't want to change a PEP unless it's a clear typo.

Also, I think as part of CI, one should run codespell on large code bases to see what the impact would be and whether there's a risk of false positives. Otherwise it's hard to tell.

corneliusroemer commented 2 months ago

This will change around 10% of all uses of reuse or around 1 word per 2 million which is quite a lot!

Google Chrome 2024-08-18 18 30 03

https://github.com/codespell-project/codespell/pull/3445#issuecomment-2295318589

It's even in titles of published books...

image
DimitriPapadopoulos commented 2 months ago

Curated dictionaries and SCOWLS (And Friends) only have reuse. The grammar rule is Use the hyphen with the prefix re only when re means again AND omitting the hyphen would cause confusion with another word.