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

ID: 18053
Updated by: gsherwood@squiz.net
Reported By: dobes at lnx dot cz
Summary: Problem to include custom standard sniffs
-Status: Open
+Status: Wont fix
Type: Bug
Package: PHP_CodeSniffer
Operating System: Irelevant
Package Version: 1.2.2
PHP Version: Irrelevant
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Wont fix
-Assigned To:
+Assigned To: squiz
I suggest you upgrade to 1.3.0RC1 and use the new ruleset.xml format. It
is much more flexible and I am not fixing any issues with the current
1.2.x method of creating custom sniffs.

Guide for upgrading is here:

Previous Comments:

[2010-11-14 15:05:10] paveld


I had problem to include my own custom standard (std) files.

When the std is included in PEAR directlry it is OK but when
custom std I have error:

Included sniff My/Sniffs/File/LineLenghtSniff.php does not exist
in <PEAR_PATH>/PHP/CodeSniffer.php on line 433.

The check is only in current working dir and not counting
different location (i tired to change include path first).

It is working for me only if I include absolute path.

Test script:
in MyCodingStandard.php file:

method getincludedSniffs() contains:

not working:

return array(

$dn = dirname(__FILE__);

return array(

Expected result:
The 'My/Sniffs/File/LineLenghtSniff.php' will be working fine.

Actual result:
Included sniff My/Sniffs/File/LineLenghtSniff.php does not exist in
<PEAR_PATH>/PHP/CodeSniffer.php on line 433.


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppear-bugs @
postedNov 17, '10 at 2:33a
activeNov 17, '10 at 2:33a

1 user in discussion

Gsherwood: 1 post



site design / logo © 2022 Grokbase