PHP_CodeSniffer : feature request
| From: | Laurent Laville | Date: | Wed, 28 Nov 2007 20:54:35 +0000 |
| Subject: | PHP_CodeSniffer : feature request | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-48619@lists.php.net to get a copy of this message | ||
Greg,
phpcs CLI has already an option to ignore file(s) and directory(ies) from parsing.
phpcs [--ignore=<pattern>] <file>
Is it possible to think to change/upgrade its behavior (something like that) and allow to :
READ a .cvsignore file contents to ignore all files/dir identified inside.
PEAR_PackageFileManager has something equivalent : @see [1] lines 106+ 109 (for merging options)
Why I ask this ? Because I think it could be usefull when a batch script run a large analysis of many files/packages (as Christian Weiske did [2]) and we don't know (for each package) what are the files to exclude.
Also, consider that command line as a limit, and we can expect to have a command like :
phpcs --ignore=blah,blah,blah,blah,blah,blah,blah,blah,blah .... blah,blah,blah, ... very long list ...,blah,blah <file>
Example : Yesterday I've commit some CS fixes on HTML_CSS, and I don't touched to CSS\Advanced.php because it's an old file written by Klaus Guenther. And this file was never be included in any public PEAR release of package HTML_CSS.
I should even create a .cvsignore file and add it inside for PFM ;-)
Report of Christian [2] is in this way a bit bogus, because CSS\Advanced.php is included and gave me again 42 errors and 12 warnings, while I just hope to have 12 errors and 0 warnings with phpcs 1.0.0RC2, and 0 error, 0 warning when 1.0.0RC3 will be released (fixing @throws tag must contain a comment)
Hope you understand what I means !
Laurent
[1] http://cvs.php.net/viewvc.cgi/pear/PEAR_PackageFileManager/PackageFileManager/Cvs.php?annotate=1.15
[2] http://pear.cweiske.de/overview.htm