You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This comes from here.
Since it is an upstream issue, I am reporting it here.
This file contents trigger the notice there must be exactly one blank line after the file comment
(note that there is a blank line after the comment, and even if adding more than one blank line won't change this message)
<?php
/**
* Intentionally empty file.
*
* It exists to stop directory listings on poorly configured servers.
*
* @package whatever
*/
This does not trigger that warning:
(note that the only difference is we added something after the blank line after comment)
<?php
/**
* Intentionally empty file.
*
* It exists to stop directory listings on poorly configured servers.
*
* @package whatever
*/
echo 'this';
I don't think it is OK to assume there will be code in any case in a file, even when there is a comment.
Thus, the warning is faulty and should probably only trigger if there is really no empty line after comment, which is clearly not the case here.
The text was updated successfully, but these errors were encountered:
gsherwood
changed the title
When file has no code, but a File Comment, then a wrongful "there must be exactly one blank line after the file comment" warning is produced
Squiz.Commenting.FileComment.SpacingAfterComment false positive on empty file
Jul 18, 2021
Uh oh!
There was an error while loading. Please reload this page.
This comes from here.
Since it is an upstream issue, I am reporting it here.
This file contents trigger the notice
there must be exactly one blank line after the file comment
(note that there is a blank line after the comment, and even if adding more than one blank line won't change this message)
This does not trigger that warning:
(note that the only difference is we added something after the blank line after comment)
I don't think it is OK to assume there will be code in any case in a file, even when there is a comment.
Thus, the warning is faulty and should probably only trigger if there is really no empty line after comment, which is clearly not the case here.
The text was updated successfully, but these errors were encountered: