FAQ
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)

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

Search Discussions

  • Bkfake-Php at Aug 29, 2014 at 8:52 pm
    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:

    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)

    ------------------------------------------------------------------------
  • Bkfake-Php at Aug 29, 2014 at 9:32 pm
    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:

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


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

    [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)

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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 29, '14 at 8:48p
activeAug 29, '14 at 9:32p
posts3
users1
websitepear.php.net

1 user in discussion

Bkfake-Php: 3 posts

People

Translate

site design / logo © 2022 Grokbase