Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 37899
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: EDAVIS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 1.090
Fixed in: (no value)



Subject: Spelling of variable names
perlcritic's code uses a variable $nonexistant. It should be -ent. How about a policy to check spelling of variable names? It would have to be very relaxed because nobody uses only English words for variables. Perhaps just checking for common misspellings like the above. If you like the idea I'll try to hack it up.
Subject: Re: [rt.cpan.org #37899] Spelling of variable names
Date: Thu, 24 Jul 2008 07:40:54 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Chris Dolan <chris [...] chrisdolan.net>
On Jul 24, 2008, at 3:33 AM, EDAVIS via RT wrote: Show quoted text
> Thu Jul 24 04:33:42 2008: Request 37899 was acted upon. > Transaction: Ticket created by EDAVIS > Queue: Perl-Critic > Subject: Spelling of variable names > Broken in: 1.090 > Severity: Unimportant > Owner: Nobody > Requestors: EDAVIS@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=37899 > > > > perlcritic's code uses a variable $nonexistant. It should be -ent. > > How about a policy to check spelling of variable names? It would have > to be very relaxed because nobody uses only English words for > variables. > Perhaps just checking for common misspellings like the above. If you > like the idea I'll try to hack it up.
If you can get it to work with a low false-positive rate, that would be cool. But I have my doubts that such a policy is practical. If you were to attempt it, you might consider using the guts of the PodSpelling policy and look for near misses. Using a hard-coded list is not a good approach, because it will fall out of date and would only apply to English. Chris
Subject: Re: [rt.cpan.org #37899] Spelling of variable names
Date: Thu, 24 Jul 2008 10:25:45 -0700
To: bug-Perl-Critic [...] rt.cpan.org
From: Jeffrey Thalhammer <jeff [...] imaginative-software.com>
On Jul 24, 2008, at 1:33 AM, EDAVIS via RT wrote: Show quoted text
> > How about a policy to check spelling of variable names? It would have > to be very relaxed because nobody uses only English words for > variables. > Perhaps just checking for common misspellings like the above. If you > like the idea I'll try to hack it up.
That's a pretty cool idea. At the very least, it might encourage people to use proper English rather than inventing their own abbreviations. Ed: Would you like a commit bit in the Perl-Critic repository? If so, just setup and account with http://tigris.org and tell me your login. -Jeff
Thanks for the offer but let me write some code first before trusting me with any commit bits :-p.
On Thu Jul 24 04:33:42 2008, EDAVIS wrote: Show quoted text
> perlcritic's code uses a variable $nonexistant. It should be -ent. > > How about a policy to check spelling of variable names? It would have > to be very relaxed because nobody uses only English words for variables. > Perhaps just checking for common misspellings like the above. If you > like the idea I'll try to hack it up.
The spelling error has been fixed. I'm going to put the variable-name-spelling policy idea on our TODO list and mark this ticket as 'resolved'.