Revise the line length rule

From: Date: Sat, 17 Dec 2011 11:24:14 +0000
Subject: Revise the line length rule
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-54634@lists.php.net to get a copy of this message
Ironically: Generic_Sniffs_Files_LineLengthSniff $error = 'Line exceeds maximum limit of %s characters; contains %s characters'; ... is 95 characters long, so the line length sniff would fail itself with the default configuration. What do you think of mirroring the checkstyle line length code? It has the ability to configure ignore patterns. http://checkstyle.sourceforge.net/config_sizes.html On Sat, Dec 17, 2011 at 3:09 PM, Greg Sherwood <gsherwood@squiz.net> wrote: > Hi Daniel, > > The first thing I do is --ignore=*/Tests/* otherwise you'd be checking all > the test files that contains errors and warnings PHPCS is checking for > during unit testing. > > Other than that, I use the PEAR standard, but try to eliminate errors > primarily. The line length standard is a guide and doesn't need to be > enforced, hence its warning status in the PEAR standard. I choose to ignore > it in many places because of the poor variable names or extra complexity > that it would require. Having said that, I do try and shorten lines where > possible. It's just not on the top of my todo list. > > But that link was very good, thanks. It showed me the EOL char for the > latest bit of contrib code was set incorrectly. I didn't pick it up, but > will now change it. That will fix the one non-test file error in PHPCS. The > other 3087, and a good chunk of warnings, are the actual test cases. > > Thanks > > Greg > > > On Sat, Dec 17, 2011 at 2:56 PM, Daniel O'Connor <daniel.oconnor@gmail.com > > wrote: > >> >> http://test.pear.php.net:8080/job/PHP_CodeSniffer/29/checkstyleResultÂÙæàõ¿Œ‰û >> ¹ ’ >> >> Do you have a preferred standard / set of rules for php_codesniffer's own >> source? Possibly one that ignores ~3000 line length warnings ? >> > > > > -- > > Greg Sherwood > Product Development Manager > E gsherwood@squiz.com.au > > Squiz Australia Pty. Ltd. A 92 Jarrett Street, Leichhardt NSW 2040 > P +61 2 8507 9900 F +61 2 8507 9988 SUPPORT 13000 SQUIZ W > www.squiz.com.au > > AUSTRALIA UNITED KINGDOM NEW ZEALAND EUROPE UNITED STATES > SYDNEY MELBOURNE CANBERRA HOBART BRISBANE > > SUPPORTED OPEN SOURCE SOLUTIONS > >

« previous php.pear.dev (#54634) next »