Bug 12185 – Spellchecker matches symbols that are more than 50% different

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-02-16T14:41:00Z
Last change time
2014-11-28T23:37:54Z
Keywords
pull
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2014-02-16T14:41:33Z
void main() { auto x = not; } test.d(5): Error: undefined identifier not, did you mean template get(T : Value[Key], Value, Key, K, V)(T aa, K key, lazy V defaultValue) if (is(typeof(true ? aa[key] : defaultValue)))? Unfortunately due to the recent AA changes the new UFCS functions are getting picked up by the spellchecker. I'm getting the above diagnostic more and more frequently. I wonder if we can do something about this without adding special cases to the compiler.
Comment #1 by yebblies — 2014-02-16T18:15:58Z
We could tweak the spell-checker so with len=3 it requires diff < 2
Comment #2 by andrej.mitrovich — 2014-02-17T00:33:07Z
Maybe I should rename this to "spellchecker recommends symbols which look nothing like each other". not => get is an awful recommendation here.
Comment #3 by yebblies — 2014-02-17T05:21:47Z
(In reply to comment #2) > Maybe I should rename this to "spellchecker recommends symbols which look > nothing like each other". not => get is an awful recommendation here. But they only differ by two characters!!!
Comment #4 by yebblies — 2014-02-17T05:44:17Z
- size_t maxdist = seedlen < 3 ? seedlen - 1 : 2; + size_t maxdist = seedlen < 3 ? seedlen - 1 : seedlen == 3 ? 1 : 2;
Comment #5 by andrej.mitrovich — 2014-02-17T05:58:51Z
(In reply to comment #4) > - size_t maxdist = seedlen < 3 ? seedlen - 1 : 2; > + size_t maxdist = seedlen < 3 ? seedlen - 1 : seedlen == 3 ? 1 : 2; Don't we have a natural language processing / AI expert among us? Cough cough Andrei. :)
Comment #6 by yebblies — 2014-02-17T06:01:27Z
(In reply to comment #5) > > Don't we have a natural language processing / AI expert among us? Cough cough > Andrei. :) "undefined identifier 'not', but all your facebook friends liked this page about cats! <link>"
Comment #7 by andrej.mitrovich — 2014-02-17T06:03:51Z
(In reply to comment #6) > (In reply to comment #5) > > > > Don't we have a natural language processing / AI expert among us? Cough cough > > Andrei. :) > > "undefined identifier 'not', but all your facebook friends liked this page > about cats! <link>" LOL. So you planning on making this pull or too busy now?
Comment #8 by yebblies — 2014-02-17T06:05:32Z
(In reply to comment #7) > (In reply to comment #6) > > (In reply to comment #5) > > > > > > Don't we have a natural language processing / AI expert among us? Cough cough > > > Andrei. :) > > > > "undefined identifier 'not', but all your facebook friends liked this page > > about cats! <link>" > > LOL. So you planning on making this pull or too busy now? Haha I'll go do it.
Comment #9 by yebblies — 2014-02-17T06:12:17Z
Comment #10 by github-bugzilla — 2014-02-17T12:30:26Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/032a6292e9c9fa354540e5afab079574d27b7f71 Fix Issue 12185 - Spellchecker matches symbols that are more than 50% different https://github.com/D-Programming-Language/dmd/commit/a98247dc37c27b1fb39b60b7d3be434975ee3984 Merge pull request #3276 from yebblies/issue12185 Issue 12185 - Spellchecker matches symbols that are more than 50% different
Comment #11 by yebblies — 2014-11-28T23:37:54Z
*** Issue 11690 has been marked as a duplicate of this issue. ***