Skip to content

Conversation

xaben
Copy link

@xaben xaben commented Aug 8, 2023

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
Copy link
Collaborator

jrfnl commented Aug 8, 2023

@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
Copy link
Author

xaben commented Sep 18, 2023

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.

Copy link
Member

@grogy grogy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, it makes sense.

@jrfnl
Copy link
Collaborator

jrfnl commented Mar 27, 2024

Rebased without changes to get a passing build.

@grogy grogy merged commit 3195a74 into php-parallel-lint:develop Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants