Edit report at https://pear.php.net/bugs/bug.php?id=20381&edit=1
ID: 20381
Comment by: bkfake-php@yahoo.com
Reported By: bkfake-php at yahoo dot com
Summary: Invalid "Comment closer must be on a new line"
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Operating System: Win 7 x64
Package Version: 1.5.4
PHP Version: 5.4.13
Roadmap Versions:
New Comment:
Another false positive, this one doesn't even have a block comment
$two = 1 + 1; // math is hard
// writing sniffs is also hard
Previous Comments:
------------------------------------------------------------------------
[2014-08-29 22:30:56] bkdotcom
Description:
------------
It seems a "post statement comment" following a block comment
improperly throws this error.
I have excluded the BlockComment.NoEmptyLineAfter and
PostStatementComment.Found sniffs which should leave the test script
error free
Test script:
---------------
/*
I am excluding two Sniffs:
+ Squiz.Commenting.BlockComment.NoEmptyLineAfter
+ Squiz.Commenting.PostStatementComment.Found
*/
$two = 1 + 1; // I'm not a comment closer!
Expected result:
----------------
should not throw "Comment closer must be on a new line" error
Actual result:
--------------
Comment closer must be on a new line
(Squiz.Commenting.BlockComment)
------------------------------------------------------------------------