Suggestion: spelling check and terms perceived as incorrectly spelled


I've got this, well, minor grievance I guess. I love PHPStorm but I'm also very pedantic on best practices and always go for the 0 errors in either logbook or, in this case, the IDE editor panel gutter which displays codesniffer / unit rule violations. One thing in particular of this case, has to do with 'spelling' things which I cannot change anything about: previous developer mixed Dutch with English and although as a literate programmer myself, I have the unresistable tendency to rewrite and I always use English. Obviously I can't easily change referenced code entities always that easily: in this case of Magento a lot of magic is in the strings - and I'm fine with that, taking the apart one piece at a time trying to refactor (just because it was bad architecture anyway).

However, also with even more commonly used (Magento again but it would go for any PHP project) a multitude of programmers use rather acceptable strings as 'frontname' to identify parts of the application. The following two are seen by the IDE as typos but I beg to differ:

     // Do something with the 'frontname' of the Magento routing path

Perhaps the first case, I'd go a long a bit but wouldn't it just be nice to be allowed and quote a word or words and thus have it seen as a name of something, rather than just an English word it does or doesn't know? This seems more sensible to me. And then:

    // Do something with the FRONTNAME of the Magento routing path

Still marks it as a typo. This, I'd argue. is just plain wrong. Full capitalization (upper-case) in English language would nearly always be interpreted as abbreviation by any automated process and with reason.

The only reason the IDE doesn't think this is a typo, is because YMCA is a word in the wordlist while in fact its an abbreviatuon.

   // It's fun to stay at the YMCA. Young man, young man, there's no need to feel down.

The only way to escape this behavior is:

  // F.U.B.A.R. stands for f@cked up beyond all recognition/repair/reason.

While obviously many people might use Y.M.C.A. in the song to spell out (which doesn't get marked a typo due to interposed periods) but FUBAR as a valid abbreviation will get marked as a typo because it isn't in the wordlist.

Ignoring full capitalized terms by the spelling correction / editor content parser component (I'm not a IDE/PHPStorm developer so wouldn't know its name and place in the source) seems like the more reasonable thing to do and I'd even go as far as to 'nice to have' that quoted terms in comments shouldn't be marked as typos either.

Excluding all these cases that many people probably experience (although definitely not all will care about quality error/typo-free code) by means of right-click 'Add to dictionary' becomes a drag as well: I'm not lazy enough to not register and not post this topic: it's a perception though and I'd like to hear what any of you lot have to say.



1 comment
Comment actions Permalink

Oh and I'd add that this flies for any western languages and also eastern that I know of more as a universal concept of notation / convention I guess.


Please sign in to leave a comment.