scspell
scspell copied to clipboard
Suggestion: show edit distance to closest correct word
When spellchecking a large codebase, one can get a lot of false positives due to variable names that are just not English. Looking for "rare" misspellings (https://github.com/myint/scspell/issues/24) helps (as typos tend to be, well, unique(ish) whereas variable names tend to be reused; but another useful heuristic may be to include the edit distance (e.g. Damerau-Levenshtein) to the closest correct word -- a long word that's just one typo away from a correct word is more likely to indeed be a typo.