Edit report at http://pear.php.net/bugs/bug.php?id=18250&edit=1

ID: 18250
Updated by: gsherwood@squiz.net
Reported By: mrten+pear at ii dot nl
Summary: --standard with relative path skips Standards'
"implicit" sniffs
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Operating System: Unix
Package Version: 1.3.0RC2
PHP Version: 5.3.1
Roadmap Versions:
New Comment:

You don't need to specify the ruleset.xml file if you have your own
standard like that. So you can do:
phpcs --standard=.include/Codesniffer/IDD ~/www/.include/it_lib.php

Leaving it out works for me, but specifying the relative path to a
rulset.xml file that is in a standard does not work for me. So I've been
able to replicate your issue. Just need to look into why specifying a
rulset.xml file explicitly does not work, but only when using a relative

Previous Comments:

[2011-02-07 23:14:32] mrten

I wrote my own ruleset.xml that does not explicitly refer to the sniffs
in the directory structure it's in. When I run phpcs with a relative
path to that ruleset.xml however, it seems to skip the rules in the
Standard directory.

For brevity I wc'd the output:

mrten@kimiko:~/www$ phpcs
~/www/.include/it_lib.php | wc
61 665 4334

mrten@kimiko:~/www$ phpcs
~/www/.include/it_lib.php | wc
111 1339 8126

and with -s for the sniff name:

mrten@kimiko:~/www$ phpcs
--standard=/home/mrten/www/.include/Codesniffer/IDD/ruleset.xml -s
~/www/.include/it_lib.php | grep IDD\. | wc
50 500 5084
mrten@kimiko:~/www$ phpcs
--standard=.include/Codesniffer/IDD/ruleset.xml -s
~/www/.include/it_lib.php | grep IDD\. | wc
0 0 0

Expected result:
That the relative and absolute path give the same results for
--standard, either way.


Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 2 | next ›
Discussion Overview
grouppear-bugs @
postedFeb 15, '11 at 5:25a
activeFeb 15, '11 at 5:35a

1 user in discussion

Gsherwood: 2 posts



site design / logo © 2022 Grokbase