Re: [HACKERS] Keyword list sanity check

2009-05-01 Thread Heikki Linnakangas
David Fetter wrote: Please clean up this code at least to the point where it's strict-clean, which means putting "use strict;" right after the shebang line and not checking it in until it runs that way. I tried, but couldn't make heads or tails of the thing, given all the unused- and similarly-n

Re: [HACKERS] Keyword list sanity check

2009-05-01 Thread Andrew Dunstan
Peter Eisentraut wrote: On Thursday 30 April 2009 10:27:45 David Fetter wrote: I'd also like to propose that "strict clean" be a minimum code quality metric for any Perl code in our code base. A lot of what's in there is just about impossible to maintain. use strict and use warnings

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread Andy Lester
On Apr 30, 2009, at 2:11 PM, David Fetter wrote: Here's a patch that gets it to pass perlcritic -4 and still (as far as I can tell) work. Tell ya what. Let me at it and I'll give a larger, more inclusive patch. xoxo, Andy -- Andy Lester => a...@petdance.com => www.theworkinggeek.com =

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread Laurent Laborde
On Tue, Apr 28, 2009 at 10:33 AM, Heikki Linnakangas wrote: > I wrote a little perl script to perform a basic sanity check to keywords in > gram.y and kwlist.h. It checks that all lists are in alphabetical order, all > keywords present in gram.y are listed in kwlist.h in the right category, and >

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread David Fetter
On Thu, Apr 30, 2009 at 09:40:50AM -0700, David Fetter wrote: > On Thu, Apr 30, 2009 at 11:39:33AM -0500, Andy Lester wrote: > > > > On Apr 30, 2009, at 6:41 AM, Robert Haas wrote: > > > >>> Please clean up this code at least to the point where it's > >>> strict-clean, which means putting "use stri

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread Heikki Linnakangas
Laurent Laborde wrote: On Tue, Apr 28, 2009 at 10:33 AM, Heikki Linnakangas wrote: I wrote a little perl script to perform a basic sanity check to keywords in gram.y and kwlist.h. It checks that all lists are in alphabetical order, all keywords present in gram.y are listed in kwlist.h in the ri

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread Peter Eisentraut
On Thursday 30 April 2009 10:27:45 David Fetter wrote: > I'd also like to propose that "strict clean" be a minimum code quality > metric for any Perl code in our code base. A lot of what's in there > is just about impossible to maintain. use strict and use warnings, I think, although with use war

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread David Fetter
On Thu, Apr 30, 2009 at 11:39:33AM -0500, Andy Lester wrote: > > On Apr 30, 2009, at 6:41 AM, Robert Haas wrote: > >>> Please clean up this code at least to the point where it's >>> strict-clean, which means putting "use strict;" right after the >>> shebang line and not checking it in until it runs

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread Bruce Momjian
Robert Haas wrote: > On Thu, Apr 30, 2009 at 3:27 AM, David Fetter wrote: > > On Tue, Apr 28, 2009 at 11:33:28AM +0300, Heikki Linnakangas wrote: > >> I wrote a little perl script to perform a basic sanity check to > >> keywords ?in gram.y and kwlist.h. It checks that all lists are in > >> alphabe

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread Andy Lester
On Apr 30, 2009, at 6:41 AM, Robert Haas wrote: Please clean up this code at least to the point where it's strict-clean, which means putting "use strict;" right after the shebang line and not checking it in until it runs that way. And "use warnings;", too. I'll prob'ly come up with a polic

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread Bruce Momjian
David Fetter wrote: > On Tue, Apr 28, 2009 at 11:33:28AM +0300, Heikki Linnakangas wrote: > > I wrote a little perl script to perform a basic sanity check to > > keywords in gram.y and kwlist.h. It checks that all lists are in > > alphabetical order, all keywords present in gram.y are listed in >

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread Robert Haas
On Thu, Apr 30, 2009 at 3:27 AM, David Fetter wrote: > On Tue, Apr 28, 2009 at 11:33:28AM +0300, Heikki Linnakangas wrote: >> I wrote a little perl script to perform a basic sanity check to >> keywords  in gram.y and kwlist.h. It checks that all lists are in >> alphabetical  order, all keywords pr

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread Andy Lester
On Apr 30, 2009, at 2:27 AM, David Fetter wrote: Please clean up this code at least to the point where it's strict-clean, which means putting "use strict;" right after the shebang line and not checking it in until it runs that way. I can take care of this, David. Shouldn't be too tough. --

Re: [HACKERS] Keyword list sanity check

2009-04-30 Thread David Fetter
On Tue, Apr 28, 2009 at 11:33:28AM +0300, Heikki Linnakangas wrote: > I wrote a little perl script to perform a basic sanity check to > keywords in gram.y and kwlist.h. It checks that all lists are in > alphabetical order, all keywords present in gram.y are listed in > kwlist.h in the right cate

Re: [HACKERS] Keyword list sanity check

2009-04-28 Thread David Fetter
On Tue, Apr 28, 2009 at 11:57:19AM +0300, Heikki Linnakangas wrote: > Greg Stark wrote: >> I had previously considered adding an assertion in the backend to >> check they're sorted properly. That would be less formatting >> dependent and would be only a couple lines of C. >> >> I don't think we ca

Re: [HACKERS] Keyword list sanity check

2009-04-28 Thread Heikki Linnakangas
Greg Stark wrote: I had previously considered adding an assertion in the backend to check they're sorted properly. That would be less formatting dependent and would be only a couple lines of C. I don't think we can do that with the gram.y check though. Well, the ordering in gram.y is just pr

Re: [HACKERS] Keyword list sanity check

2009-04-28 Thread Greg Stark
I had previously considered adding an assertion in the backend to check they're sorted properly. That would be less formatting dependent and would be only a couple lines of C. I don't think we can do that with the gram.y check though. -- Greg On 28 Apr 2009, at 09:33, Heikki Linnakangas >

[HACKERS] Keyword list sanity check

2009-04-28 Thread Heikki Linnakangas
I wrote a little perl script to perform a basic sanity check to keywords in gram.y and kwlist.h. It checks that all lists are in alphabetical order, all keywords present in gram.y are listed in kwlist.h in the right category, and conversely that all keywords listed in kwlist.h are listed in gra