@@ 589-598 (lines=10) @@ | ||
586 | // this format are relative paths and attempt to convert them |
|
587 | // to absolute paths. If this fails, let the reference run through |
|
588 | // the normal checks and have it fail as normal. |
|
589 | if (substr($ref, 0, 1) === '.') { |
|
590 | $realpath = Util\Common::realpath($rulesetDir.'/'.$ref); |
|
591 | if ($realpath !== false) { |
|
592 | $ref = $realpath; |
|
593 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
594 | echo str_repeat("\t", $depth); |
|
595 | echo "\t\t=> ".Util\Common::stripBasepath($ref, $this->config->basepath).PHP_EOL; |
|
596 | } |
|
597 | } |
|
598 | } |
|
599 | ||
600 | // As sniffs can't begin with a tilde, assume references in |
|
601 | // this format are relative to the user's home directory. |
|
@@ 602-611 (lines=10) @@ | ||
599 | ||
600 | // As sniffs can't begin with a tilde, assume references in |
|
601 | // this format are relative to the user's home directory. |
|
602 | if (substr($ref, 0, 2) === '~/') { |
|
603 | $realpath = Util\Common::realpath($ref); |
|
604 | if ($realpath !== false) { |
|
605 | $ref = $realpath; |
|
606 | if (PHP_CodeSniffer_VERBOSITY > 1) { |
|
607 | echo str_repeat("\t", $depth); |
|
608 | echo "\t\t=> ".Util\Common::stripBasepath($ref, $this->config->basepath).PHP_EOL; |
|
609 | } |
|
610 | } |
|
611 | } |
|
612 | ||
613 | if (is_file($ref) === true) { |
|
614 | if (substr($ref, -9) === 'Sniff.php') { |