pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: (pkglint) OVERRIDE_GEMSPEC is modified using "+=", its name should indicate plural.

On Sat, May 11, 2013 at 10:24:26PM +0200, Alistair Crooks wrote:
 > To ask other questions about the pkglint warning:
 > 1. Why should a name indicate plural just because a "+=" is used?

pkglint has a notion that some variables are lists of things, and
those variables should have plural names. (It also believes that there
is no use of += that is not adding items to a list.)

 > 2. "SPEC" is an abbreviation. Is correct English usage to use an
 > 'S' in abbreviations where plural. cf English "maths" vs US English
 > "math" usage

"specs" for "specifications" is widely seen. "maths" is a bad example
because "mathematics" is not really a plural. (what's a "mathematic"?)

however, looking at the usage of the variable, to match the pattern
that pkglint has in mind (and other usages in pkgsrc) (and to be fair
there is some value to this kind of consistency) it should be called

 > 4.  What if the plural of a definition does not have a traditional -s
 > suffix? Can we link pkglint to spell/ispell/aspell without incurring
 > the licensing gods wrath?


   PKG_SHEEP+=     goats

pkglint says

   WARN: Makefile:20: As PKG_SHEEP is modified using "+=", its name should 
indicate plural.

so I guess we'd better! :-)

There's a list of variables and properties embedded in pkglint, and I
expect if we needed to it would be possible to explicitly tag
PKG_SHEEP as plural to shut this warning up.

David A. Holland

Home | Main Index | Thread Index | Old Index