php-parallel-lint / PHP-Parallel-Lint

This tool check syntax of PHP files faster than serial check with fancier output.
Other
287 stars 21 forks source link

Skip shebang sequence if it is the first line #146

Closed xaben closed 7 months ago

xaben commented 1 year ago

When linting executable files the first line is not always the php opening tag.

On such occasions we need to skip the shebang line, and read next line.

jrfnl commented 1 year ago

@xaben Thank you for the PR. This looks like a good change to me.

Could you add a unit test for this ? There is a test file dealing with the lint skipping here and you can probably add an extra test to that: https://github.com/php-parallel-lint/PHP-Parallel-Lint/blob/develop/tests/Unit/Process/SkipLintProcessTest.php

xaben commented 1 year ago

Hi @jrfnl ,

I have a test for the shebang skip in the PR, is it in the wrong test file?

PS Sorry I'm not using GitHub day to day so haven't seen your reply until now.

jrfnl commented 7 months ago

Rebased without changes to get a passing build.