Re: about PHP_CodeSniffer 1.0.0 (regression test suite and more)

From: Date: Sat, 22 Dec 2007 22:03:37 +0000
Subject: Re: about PHP_CodeSniffer 1.0.0 (regression test suite and more)
References: 1 2  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-4713@lists.php.net to get a copy of this message
Hi Laurent, What you have said makes sense because of how is_dir() works. What if you run phpcs from a different directory (not your bin dir). Does it work fine then, assuming there is also no PEAR subdir from where you run it? I'm thinking of just switching the logic around to check for an installed standard first and then revert to using a custom standard if it doesn't exist. I'll let you know when I've made the changes. Greg Laurent Laville wrote:
After investigation, I've realized that : running phpcs from my PEAR executables directory
     bin_dir          C:\wamp\php
where phpcs (and .bat for windows) should be where there is a also a subdirectory named PEAR You known its the PEAR directory
     php_dir          C:\wamp\php\pear
while CodeSniffer::process (line 221 and more) is called code between lines 235-241
    if (is_dir($standard) === true) {
        // This is a custom standard.
        $this->standardDir = $standard;
        $standard          = basename($standard);
    } else {
        $this->standardDir = realpath(dirname(__FILE__).'/CodeSniffer/Standards/'.$standard);
    }
is executed, BUT not as wanted !


« previous php.pear.qa (#4713) next »