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

ID: 18196
Comment by: arzala
Reported By: anirudh at aspl dot in
Summary: PEAR MultiLineCondition.SpaceBeforeOpenBrace not
consistent with newline chars
Status: Closed
Type: Documentation Problem
Package: PHP_CodeSniffer
Package Version: 1.3.0RC1
PHP Version: 5.3.1
Assigned To: squiz
New Comment:

I have found that this bug has reappeared in latest stable version.
Today I installed 1.3.0 stable and ran PEAR coding standard for code
mentioned in this report and found same error.


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

[2011-01-19 23:30:23] squiz

<div id="changeset">
<span class="removed">-Status: Feedback</span>
<span class="added">+Status: Closed</span>
</div>This bug has been fixed in SVN.

If this was a documentation problem, the fix will appear on pear.php.net
by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

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

[2011-01-19 23:28:16] squiz

<div id="changeset">
<span class="removed">-Summary: PEAR SpaceBeforeOpenBrace is not
consistent with
different newline chars</span>
<span class="added">+Summary: PEAR
MultiLineCondition.SpaceBeforeOpenBrace not
consistent with newline chars</span>
</div>

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

[2011-01-19 23:27:18] squiz

<div id="changeset">
<span class="removed">-Summary:
PEAR.ControlStructures.MultiLineCondition.SpaceBeforeOpenBrace
- dont get it..</span>
<span class="added">+Summary: PEAR SpaceBeforeOpenBrace is not
consistent with
different newline chars</span>
</div>

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

[2011-01-19 23:26:40] squiz

PHP_CodeSniffer handles DOS newlines just fine. The sniff itself didn't
have newline detection in it for this particular message, so the error
message only appeared (in this case) when the newline was two chars long
(like /n).

I've changed the sniff to detect that there is a newline after the brace
and present an error message that says this. This works for all newline
chars phpcs detects (/n, /r, /n).

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

[2011-01-19 20:39:30] seikilos

I could reproduce it. Codesniffer seems to have issues with dos line
encoding. I did a manual dos2unix on a file and it worked.

Is there a patch possible to convert all files prior to scanning to unix
newlines?
I develop on a windows maschine and other users on windows may have
issues with unix line endings on some editors

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=18196

Search Discussions

  • Anirudh at Jul 7, 2011 at 11:00 am
    Edit report at http://pear.php.net/bugs/bug.php?id=18196&edit=1

    ID: 18196
    Comment by: anirudh@aspl.in
    Reported By: spam at endstadium dot com
    Summary: PEAR MultiLineCondition.SpaceBeforeOpenBrace not
    consistent with newline chars
    Status: Closed
    Type: Documentation Problem
    Package: PHP_CodeSniffer
    Package Version: 1.3.0RC1
    PHP Version: 5.3.1
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    Sorry, it seems that it was my filesystem issue. Bug is not there
    anymore.


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

    [2011-07-07 10:25:18] arzala

    I have found that this bug has reappeared in latest stable version.
    Today I installed 1.3.0 stable and ran PEAR coding standard for code
    mentioned in this report and found same error.

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

    [2011-01-19 23:30:23] squiz

    -Status: Feedback
    +Status: Closed
    This bug has been fixed in SVN.

    If this was a documentation problem, the fix will appear on pear.php.net
    by the end of next Sunday (CET).

    If this was a problem with the pear.php.net website, the change should
    be live shortly.

    Otherwise, the fix will appear in the package's next release.

    Thank you for the report and for helping us make PEAR better.

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

    [2011-01-19 23:28:16] squiz

    -Summary: PEAR SpaceBeforeOpenBrace is not consistent with
    different newline chars
    +Summary: PEAR MultiLineCondition.SpaceBeforeOpenBrace not
    consistent with newline chars


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

    [2011-01-19 23:27:18] squiz

    -Summary:
    PEAR.ControlStructures.MultiLineCondition.SpaceBeforeOpenBrace
    - dont get it..
    +Summary: PEAR SpaceBeforeOpenBrace is not consistent with
    different newline chars


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

    [2011-01-19 23:26:40] squiz

    PHP_CodeSniffer handles DOS newlines just fine. The sniff itself didn't
    have newline detection in it for this particular message, so the error
    message only appeared (in this case) when the newline was two chars long
    (like /n).

    I've changed the sniff to detect that there is a newline after the brace
    and present an error message that says this. This works for all newline
    chars phpcs detects (/n, /r, /n).

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

    The remainder of the comments for this report are too long. To view
    the rest of the comments, please view the bug report online at
    http://pear.php.net/bugs/bug.php?id=18196

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJul 7, '11 at 8:27a
activeJul 7, '11 at 11:00a
posts2
users2
websitepear.php.net

2 users in discussion

Arzala: 1 post Anirudh: 1 post

People

Translate

site design / logo © 2022 Grokbase