codespell-project / codespell

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

[feature] find double words #2351

Open polluks opened 2 years ago

polluks commented 2 years ago

Something like this

grep -v 'long long\|optab optab\|template template\|double double' *.{[chS],cc} */*.{[chS],cc} *.def config/*/* 2>/dev/null | grep ' \([a-zA-Z]\+\) \1 '
peternewman commented 2 years ago

I'm sure we've had this suggestion before, but I can't find the issue for it currently...

Yeah this sounds like a nice idea, although spellintian has sometimes struggled and got confused (e.g. if if) and I think missed stuff across newlines.

polluks commented 2 years ago

How about a dictionary of exceptions?