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

PSR12.Files.FileHeader locks up when inline comment is the last content in a file #2619

Closed
ADmad opened this issue Sep 29, 2019 · 4 comments
Closed
Milestone

Comments

@ADmad
Copy link

ADmad commented Sep 29, 2019

PSR12\Sniffs\Files\FileHeaderSniff hangs up when checking file with following content

<?php
// Do nothing

@gsherwood gsherwood added this to the 3.5.1 milestone Sep 30, 2019
@dereuromark
Copy link
Contributor

Is this a dup of #2616 ?

@ADmad
Copy link
Author

ADmad commented Sep 30, 2019

No it's not. In this case phpcs hangs and never generates any output.

@gsherwood gsherwood changed the title FileHeaderSniff locks up PSR12.Files.FileHeader locks up when inline comment is the last content in a file Oct 1, 2019
gsherwood added a commit that referenced this issue Oct 1, 2019
@gsherwood
Copy link
Member

Thanks for reporting this. Fix will be in 3.5.1.

@ttrig
Copy link

ttrig commented Oct 30, 2019

If you add another comment below // Do nothing (716b619), the same issue appear, at least for me.

<?php
// Do nothing
// Do nothing again

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

No branches or pull requests

4 participants