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

ID: 19095
Updated by: m.breedveld@coolblue.nl
Reported By: m dot breedveld at coolblue dot nl
Summary: External standard does not work
Status: Duplicate
Type: Bug
Package: PHP_CodeSniffer
Operating System: Windows 7
Package Version: 1.3.1
PHP Version: 5.3.8
Assigned To: squiz
Roadmap Versions:
New Comment:

I cannot see the bug #19096.

ERROR:â– The user who submitted this bug has not yet confirmed their
email address.

Previous Comments:

[2011-12-01 23:29:58] squiz

-Status: Open
+Status: Duplicate
-Assigned To:
+Assigned To: squiz
Seems to be submitted twice. Issue with test script is bug #19096


[2011-12-01 15:31:57] michaelb

-Package Version: 1.3.2
+Package Version: 1.3.1
Package Version is not 1.3.2 but it's 1.3.1 sorry my bad.


[2011-12-01 13:06:19] michaelb

Loading external standard does not work.

I'm trying to load an self made standard which is outside the
PHP_CodeSniffer's Standards directory discribed on

But this does not work, when i load de standard like this.
(see test script)

The MyStandard dir has an valid ruleset.xml ( i think because it works
when it is inside the PHP_CodeSniffer's Standards directory)

Am i missing something or is this a bug?

Test script:
// Does not work
phpcs --standard=C:\\MyStandard pathtofile

phpcs --standard=C:\MyStandard pathtofile

phpcs --standard=C://MyStandard pathtofile

// Does work when i put MyStandard dir in the
// PHP_CodeSniffer's Standards directory

phpcs --standard=MyStandard pathtofie

Ruleset.xml :

<?xml version="1.0"?>
<ruleset name="MyStandard">
<description>The MyStandard coding standard.</description>

<!-- Function Sniffs -->
<rule ref="Generic.Functions.FunctionCallArgumentSpacing"/>
<!-- //Function Sniffs -->

<!-- Formatting Sniffs -->
<rule ref="Generic.Formatting.NoSpaceAfterCast"/>
<!-- //Formatting Sniffs -->

<!-- PHP Sniffs -->
<rule ref="Generic.PHP.LowerCaseConstant"/>
<rule ref="Generic.PHP.DisallowShortOpenTag"/>
<rule ref="Generic.PHP.ForbiddenFunctions"/>
<!-- //PHP Sniffs -->


<!-- Lines can be 150 chars long, show errors at 150 chars -->
<rule ref="Generic.Files.LineLength">
<property name="lineLimit" value="150"/>
<property name="absoluteLineLimit" value="150"/>

<!-- Use Windows newlines -->
<rule ref="Generic.Files.LineEndings">
<property name="eolChar" value="\r\n"/>

<!-- //FILES SNIFFS -->

<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
<rule ref="Generic.NamingConventions.ConstructorName"/>


Expected result:
Error report.


Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 5 | next ›
Discussion Overview
grouppear-bugs @
postedDec 1, '11 at 2:32p
activeDec 4, '11 at 10:01p

2 users in discussion

Gsherwood: 3 posts M Breedveld: 2 posts



site design / logo © 2021 Grokbase