Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.7.2

Request #17683 ignore files by coding standard
Submitted: 2010-08-10 12:03 UTC
From: cybot Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.2)
PHP Version: 5.3.3 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2010-08-10 12:03 UTC] cybot (Sebastian Mendel)
Description: ------------ it would be nice if i could add files to the coding standard that will be ignored if i sniff a whole directory/project e.g. phpcs --standard=TYPO3 ./typo3conf/ext/my_ext/ this should ignore ext_emconf.php Test script: --------------- phpcs --standard=TYPO3 ./typo3conf/ext/my_ext/ Expected result: ---------------- ignore ext_emconf.php Actual result: -------------- much off errors in ext_emconf.php

Comments

 [2010-08-10 12:04 UTC] cweiske (Christian Weiske)
Reason is that ext_emconf.php gets autogenerated by typo3 and does not adhere to the coding standards.
 [2010-08-11 08:45 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
You can now do this in ruleset.xml files. Specify exclude-pattern tags to set the ignore rules. So if you used to go: --ignore=*/Tests/*,*/Data/* You put this in your ruleset.xml file: <exclude-pattern>*/Tests/*</exclude-pattern> <exclude-pattern>*/Data/*</exclude-pattern>