Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug #19448 : Problem with detecting remote standards. Note that…

… this reverts the changes from pull request #29, although the symlink issue that code was fixing appears to have now been fixed by other changes to CodeSniffer.php anyway.
  • Loading branch information...
commit fbab82e310f76b9e77ca9bcf1da08f76f16e2de5 1 parent 97a8219
Greg Sherwood gsherwood authored
Showing with 4 additions and 3 deletions.
  1. +3 −3 CodeSniffer.php
  2. +1 −0  package.xml
6 CodeSniffer.php
View
@@ -612,7 +612,7 @@ public function setTokenListeners($standard, array $sniffs=array())
$standard = (string) $ruleset['name'];
} else {
- self::$standardDir = realpath(dirname(__FILE__).'/CodeSniffer/Standards').DIRECTORY_SEPARATOR.$standard;
+ self::$standardDir = realpath(dirname(__FILE__).'/CodeSniffer/Standards/'.$standard);
if (is_dir(self::$standardDir) === false) {
// This isn't looking good. Let's see if this
// is a relative path to a custom standard.
@@ -819,7 +819,7 @@ private function _expandRulesetReference($sniff)
$sniff = basename($path);
} else if (is_file($sniff) === false) {
// See if this is a whole standard being referenced.
- $path = realpath(dirname(__FILE__).'/CodeSniffer/Standards').DIRECTORY_SEPARATOR.$sniff;
+ $path = realpath(dirname(__FILE__).'/CodeSniffer/Standards/'.$sniff);
if (is_dir($path) === true) {
$isDir = true;
} else {
@@ -831,7 +831,7 @@ private function _expandRulesetReference($sniff)
}
$path = $parts[0].'/Sniffs/'.$parts[1].'/'.$parts[2].'Sniff.php';
- $path = realpath(dirname(__FILE__).'/CodeSniffer/Standards').DIRECTORY_SEPARATOR.$path;
+ $path = realpath(dirname(__FILE__).'/CodeSniffer/Standards/'.$path);
if ($path === false && self::$standardDir !== '') {
// The sniff is not locally installed, so check if it is being
// referenced as a remote sniff outside the install. We do this by
1  package.xml
View
@@ -41,6 +41,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
- Fixed bug #19421 : phpcs doesn't recognize ${x} as equivalent to $x
- Fixed bug #19428 : PHPCS Report "hgblame" doesn't support windows paths
-- Thanks to Justin Rovang for the patch
+ - Fixed bug #19448 : Problem with detecting remote standards
- Fixed bug #19471 : phpcs on Windows, when using Zend standard, doesn't catch problems
-- Thanks to Ivan Habunek for the patch
</notes>

1 comment on commit fbab82e

Ryan Neufeld

Is there an ETA on when/which build this will be released in?

Please sign in to comment.
Something went wrong with that request. Please try again.