[PEAR-BUG] Bug #20381 [Opn->Csd]: Invalid "Comment closer must be on a new line"

[email protected]
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at https://pear.php.net/bugs/bug.php?id=20381&edit=1

 ID:               20381
 Updated by:       [email protected]
 Reported By:      bkfake-php at yahoo dot com
 Summary:          Invalid "Comment closer must be on a new line"
-Status:           Open
+Status:           Closed
 Type:             Bug
 Package:          PHP_CodeSniffer
 Operating System: Win 7 x64
 Package Version:  1.5.4
 PHP Version:      5.4.13
-Assigned To:      
+Assigned To:      squiz
 Roadmap Versions: 
 New Comment:

-Status:      Open
+Status:      Closed
-Assigned To:
+Assigned To: squiz
Thanks for the PR. Merged and pushed.


Previous Comments:
------------------------------------------------------------------------

[2014-08-29 23:32:40] bkdotcom

pull request submitted to GitHub:
Standards/Squiz/Sniffs/Commenting/ClockCommentSniff.php

------------------------------------------------------------------------

[2014-08-29 22:53:25] bkdotcom

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

------------------------------------------------------------------------

[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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.