Skip to content

File path and line nr does not get stripped when passing relative path with Windows slashes #94

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

Closed
jrfnl opened this issue Feb 20, 2022 · 2 comments · Fixed by #118
Closed
Assignees

Comments

@jrfnl
Copy link
Collaborator

jrfnl commented Feb 20, 2022

Command

parallel-lint .\tests\file-with-parse-error.php

Expected output

Syntax error found in 1 file

------------------------------------------------------------
Parse error: .\tests\file-with-parse-error.php:6
    5|
  > 6| echo . $text;
    7|
Unexpected token "."

Actual output

Syntax error found in 1 file

------------------------------------------------------------
Parse error: .\tests\file-with-parse-error.php:6
    5|
  > 6| echo . $text;
    7|
Unexpected token "." in .\tests\file-with-parse-error.php on line 6

Take note of the difference in the last line of the output.

@jrfnl
Copy link
Collaborator Author

jrfnl commented Feb 20, 2022

Just done some more testing: also happens with Windows absolute paths, relative phar paths parallel-lint ./files/pear2coverage.phar -e phar and more.

@jrfnl
Copy link
Collaborator Author

jrfnl commented Feb 20, 2022

Cause is most likely that PHP itself doesn't shorten those paths, but all the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant