PHP_CodeSniffer (Christmas 2007 gift)

From: Date: Sun, 23 Dec 2007 15:40:15 +0000
Subject: PHP_CodeSniffer (Christmas 2007 gift)
Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-4715@lists.php.net to get a copy of this message
Hello all, With stable release 1.0.0 of PHP_CodeSniffer, I've begun to play as a little boy with a new toy. Tired to have always the same errors ERROR | End of line character is invalid; expected "\n" but found "\r\n" ERROR | Constants must be uppercase; expected 'PHPUNIT_MAIN_METHOD' but
      | found 'PHPUnit_MAIN_METHOD'
ERROR | Constants must be uppercase; expected PHPUNIT_MAIN_METHOD but
      | found PHPUnit_MAIN_METHOD
when checking my packages source (on my Windows PC), I've build my own PEAR standard with exceptions : - when running on Windows platform check end line with "\r\n" rather than "\n". - when checking PHPUnit 3.x test suites accept mixed upper/lower case for constants. VERY VERY EASY (thanks Greg to make it possible with little effort) ! My contribution, if someone want to use it, is available for download at [1]. To use it: 1. download content of ZIP file into a directory named A (A is what you want) 2. run command phpcs --standard=A\MyPEAR file_or_dir_to_check Example: phpcs --standard=C:\php\CodeSniffer\Standards\MyPEAR C:\php\pear\Services_W3C_CSSValidator\tests\AllTests.php Happy Christmas Laurent [1] http://pear.laurent-laville.org/pepr/PHP_CodeSniffer/MyPEAR-0.1.0.zip

« previous php.pear.qa (#4715) next »