Re: Surprising WARNING with PHP_CodeSniffer 1.0.0RC1
| From: | Greg Sherwood | Date: | Sat, 03 Nov 2007 23:58:11 +0000 |
| Subject: | Re: Surprising WARNING with PHP_CodeSniffer 1.0.0RC1 | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-48401@lists.php.net to get a copy of this message | ||
Hi Laurent,
Carsten's done a good job of showing the fixes, but I thought I'd show you where those warnings come from in the PEAR coding standard.
First a note that they are both warnings and not errors, so they are just recommendations in the PEAR standard.
The line length one comes from: http://pear.php.net/manual/en/standards.php#standards.indenting
"It is recommended to keep lines at approximately 75-85 characters long for better code readability."We used 85 characters as the maximum in the sniff. As far as I can tell, there are no current standards that tell you how you should break up a line, but I think at least one of those is now proposed. The alignment of equals signs comes from: http://pear.php.net/manual/en/standards.funcalls.php
"In the case of a block of related assignments, more space may be inserted to promote readability:"Again, this is a just a warning and, if I'm reading the standard correctly, can be ignored. If you want to hide warnings from the phpcs output, use the -n command line argument. Greg Laurent Laville wrote:
To Greg, Marc (package leaders) While I'm starting again to work on PHP_CompatInfo, I've run PHP_CodeSniffer 1.0.0RC1 on all files of my package distrib, and found some stranges warnings. Here are the list: look out specially on surrounding assignments Lines refered to CVS version CVS: $Id: Cli.php,v 1.22 2007/11/03 11:38:50 farell Exp $ Perharps it's still something to fix before release final version 1.0.0 of PHP_CodeSniffer , or you can give me an explain . Thanks for your package that improve a lot the QA Regards Laurent