Re: PHP_CodeSniffer 1.2
| From: | Bill Shupp | Date: | Thu, 05 Nov 2009 17:54:37 +0000 |
| Subject: | Re: PHP_CodeSniffer 1.2 | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-53033@lists.php.net to get a copy of this message | ||
On Nov 5, 2009, at 9:40 AM, Ken Guest wrote:
this makes me think of the php_beautifier package. if there were a way of getting it to accept errors & warnings from phpcs and modify the tested code so that it does adhere to the standards that'd be amazing. k.I used to think that, but one big problem I have with it is how it strips whitespace. I intentionally use whitespace to delineate groups of functionality within a given code block. And ultimately, you end up with code formatted different from what you intended. I think it's better to adhere to coding standards, and use a guide like PHPCS to help detect problems. Auto-formatting brings its own set of problems. But it is useful for formatting code that is horrendously out of compliance, such as things you didn't write yourself but now are working on. But in the case of this thread, where care was put into the formatting of code, and with an upgrade of the tool, I'm way out of compliance again. All for a change to the CS I wasn't even aware of, let alone agree with. It's quite frustrating. Bill