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

  ID: 20057
  Updated by: gsherwood@squiz.net
  Reported By: tlemke at naji-dev dot de
  Summary: Custom ruleset not working with composer-version
-Status: Open
+Status: Feedback
  Type: Bug
  Package: PHP_CodeSniffer
  Operating System: Fedora
  Package Version: 1.4.6
  PHP Version: 5.4.17
-Assigned To:
+Assigned To: squiz
  Roadmap Versions:
  New Comment:

-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: squiz
I can't replicate this issue on either a PEAR install, a composer
install (1.*) or a
fresh git clone. No matter how PHPCS is installed, the ruleset code is
exactly the
same, so it also doesn't make a lot of sense that the code would behave
differently
based on where it is located.

One thing to try might be a fresh clone of PHPCS and running it from
there:
git clone git@github.com:squizlabs/PHP_CodeSniffer.git
cd PHP_CodeSniffer
php scripts/phpcs /path/to/code --standard=/path/to/ruleset.xml -v

Or any other hints you might have for how to replicate this.


Previous Comments:
------------------------------------------------------------------------

[2013-09-02 10:40:18] naji

Description:
------------
Tried to use phpcs in a composer environment. But there are way too much

sniffs registered. The pear installation is doing it correctly.

Test script:
---------------
<?xml version="1.0"?>
<ruleset name="big20">
  <description>The Big20 coding standard.</description>

  <rule ref="PSR2" />

  <rule ref="Generic.Files.LineLength">
   <properties>
    <property name="lineLimit" value="260"/>
    <property name="absoluteLineLimit" value="2000"/>
   </properties>
  </rule>
</ruleset>


Expected result:
----------------
"Registering sniffs in big20 standard... DONE (40 sniffs registered)"
with the
composer-installation

"Registering sniffs in big20 standard... DONE (40 sniffs registered)"
with the
pear-installation

Actual result:
--------------
"Registering sniffs in big20 standard... DONE (197 sniffs registered)"
with the
composer-installation

"Registering sniffs in big20 standard... DONE (40 sniffs registered)"
with the
pear-installation

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 5, '13 at 10:02p
activeSep 5, '13 at 10:02p
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase