Skip to content
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

Skip shebang sequence if it is the first line #146

Merged
merged 1 commit into from
Mar 27, 2024

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
17 checks passed
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.

None yet

3 participants