4 ms·
Sadly typos in variable names are not checkable that easy
by merb 3y ago
Sadly typos in variable names are not checkable that easy
- zeroCalories 3y agoDoesn't seem hard to me? You could easily run a spell checker on identifiers and comments. It will produce a lot of false-positives, but that can be solved by making the changes optional or using an allow list.
- bluGill 3y agoThen please write one. Note that the important part is a good way to mark all those false positives that is simple and doesn't go to far. Just because I want a bad spelling in one place doesn't mean I want it everywhere. As a result I'm going to predict that your tool either results in too much boilerplate needed to suppress all the false positives, or your tool lets pass a lot of things that shouldn't. But that might be just that I don't have good ideas: if you create a good tool for this I'm willing to be proven wrong.
- dgellow 3y agoIt’s called cspell https://cspell.org/ https://cspell.org/
- johannes1234321 3y agoDoes that understand that when talking about HTTP headers I talk about "referer" but when talking about JavaScript I have to use "referrer"? - What is wrong in one place can be different elsewhere. Terminology, spelling, accepted abbreviations depend very much on context. And sometimes even a wrong spelling is right as it's in some standard ...
- comex 3y ago> Does that understand that when talking about HTTP headers I talk about "referer" but when talking about JavaScript I have to use "referrer"? I bet GPT-4 understands that. (Though I have no personal experience using it for code review.)
- merb 3y agocspell works as a guide, but not as a rejection/auto correction. It’s okish but it does not solve intent. It‘s perfect for comments tough
- kridsdale1 3y agoWe (at google) do have this checker.