Don't provide a mistyped-name suggestion when no names are "similar enough" to the name in question




4 years ago
4 years ago


(Reporter: Waldo, Unassigned)


(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)




4 years ago
<jorendorff> FAILED! [reported from test()] */;") : Expected value 'ReferenceError: setter is not defined, did you mean 'stop'?', Actual value 'ReferenceError: setter is not defined, did you mean 'neuter'?'

"setter" is not at all close to "stop".  "setter" is also not at all close to "neuter".  We shouldn't be making a suggestion at all here, if it's going to be as bad as these.

(Does our distance metric not consider keyboard layouts or something?  The "s" and "n" in "setter"/"neuter" are not at all near each other on a qwerty keyboard, but I'd expect likelihood-of-typo to be a factor in the distance algorithm.)
It is just plain ol edit distance, no keyboard layout optimizations or anything.
You need to log in before you can comment on or make changes to this bug.