FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=20381&edit=1

  ID: 20381
  Updated by: gsherwood@squiz.net
  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)

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedSep 1, '14 at 12:25a
activeSep 1, '14 at 12:25a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase