-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fixer incorrectly handles filepaths with repeated dir names #1267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
orx0r
added a commit
to orx0r/PHP_CodeSniffer
that referenced
this issue
Jan 11, 2017
orx0r
added a commit
to orx0r/PHP_CodeSniffer
that referenced
this issue
Jan 11, 2017
orx0r
added a commit
to orx0r/PHP_CodeSniffer
that referenced
this issue
Jan 11, 2017
PR: #1269 |
orx0r
added a commit
to orx0r/PHP_CodeSniffer
that referenced
this issue
Jan 12, 2017
orx0r
added a commit
to orx0r/PHP_CodeSniffer
that referenced
this issue
Jan 12, 2017
gsherwood
added a commit
that referenced
this issue
Jan 12, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Fixer incorrectly handles filepath, e.g.:
For example, if filePath is
/app/path/app/file.php
and cwd is/app/
, expected filepath should bepath/app/file.php
But in fact, filepath became wrong -
pathfile.php
Because
str_replace
replaces all occurrences in target filepath:https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Fixer.php#L246
The text was updated successfully, but these errors were encountered: