| Newsgroups |
php.pear.bugs |
| Message-ID |
<[email protected]> |
Edit report at https://pear.php.net/bugs/bug.php?id=20381&edit=1
ID: 20381
Comment by: [email protected]
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:
Scratch that last comment... there is, in fact a block comment above a
chain of single line comments...
/*
block comment
*/
$two = 1 + 1; // math is hard
// I'm not a closer!
so... it's very similar to my original report
Previous Comments:
------------------------------------------------------------------------
[2014-08-29 22:48:43] bkdotcom
Another false positive, this one doesn't even have a block comment
$two = 1 + 1; // math is hard
// writing sniffs is also hard
------------------------------------------------------------------------
[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)
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=20381&edit=1