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  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 45 - 36 = ?

 
 [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>