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

ID: 19693
Updated by: gsherwood@squiz.net
Reported By: pear at kennel17 dot co dot uk
Summary: exclude-pattern * no longer works
-Status: Open
+Status: Feedback
Type: Bug
Package: PHP_CodeSniffer
Operating System: All
Package Version: 1.4.1
PHP Version: Irrelevant
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Feedback
-Assigned To:
+Assigned To: squiz
Yes, it should exclude all files, so I will look into it. But the best
way of doing this is
actually to use this:

<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
<severity>0</severity>
</rule>

That drops the severity down to 0, which tells PHPCS to stop generating
that
message. Give that a go and let me know if it works.


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

[2012-11-07 00:50:55] happydog

Description:
------------
In 1.4.0 I had this instruction in my ruleset.xml:

<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
<exclude-pattern>*</exclude-pattern>
</rule>

This successfully excluded the rule for all files.

In 1.4.1, this no longer works, and the EndLine errors are reported.

I tried adding type="relative" to the <exclude-pattern> tag, but this
makes no difference.

Expected result:
----------------
An exclude pattern of * should block all files, regardless of whether in
'absolute' or 'relative' mode.

Actual result:
--------------
It doesn't seem to work in either mode.

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

Search Discussions

  • Gsherwood at Nov 7, 2012 at 2:02 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19693&edit=1

    ID: 19693
    Updated by: gsherwood@squiz.net
    Reported By: pear at kennel17 dot co dot uk
    -Summary: exclude-pattern * no longer works
    +Summary: exclude-patterns no longer work on specific messages
    Status: Feedback
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: All
    Package Version: 1.4.1
    PHP Version: Irrelevant
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Summary: exclude-pattern * no longer works
    +Summary: exclude-patterns no longer work on specific messages



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

    [2012-11-07 01:37:47] squiz

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    Yes, it should exclude all files, so I will look into it. But the best
    way of doing this is
    actually to use this:

    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
    <severity>0</severity>
    </rule>

    That drops the severity down to 0, which tells PHPCS to stop generating
    that
    message. Give that a go and let me know if it works.

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

    [2012-11-07 00:50:55] happydog

    Description:
    ------------
    In 1.4.0 I had this instruction in my ruleset.xml:

    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
    <exclude-pattern>*</exclude-pattern>
    </rule>

    This successfully excluded the rule for all files.

    In 1.4.1, this no longer works, and the EndLine errors are reported.

    I tried adding type="relative" to the <exclude-pattern> tag, but this
    makes no difference.

    Expected result:
    ----------------
    An exclude pattern of * should block all files, regardless of whether in
    'absolute' or 'relative' mode.

    Actual result:
    --------------
    It doesn't seem to work in either mode.

    ------------------------------------------------------------------------
  • Gsherwood at Nov 7, 2012 at 2:04 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19693&edit=1

    ID: 19693
    Updated by: gsherwood@squiz.net
    Reported By: pear at kennel17 dot co dot uk
    Summary: exclude-patterns no longer work on specific messages
    -Status: Feedback
    +Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: All
    Package Version: 1.4.1
    PHP Version: Irrelevant
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    -Status: Feedback
    +Status: Closed
    Fixed in github repo:
    https://github.com/squizlabs/PHP_CodeSniffer/commit/0181a097c94ab7b1a5c5a3fdb
    2aab60c470fa483


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

    [2012-11-07 02:02:38] squiz

    -Summary: exclude-pattern * no longer works
    +Summary: exclude-patterns no longer work on specific messages


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

    [2012-11-07 01:37:47] squiz

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    Yes, it should exclude all files, so I will look into it. But the best
    way of doing this is
    actually to use this:

    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
    <severity>0</severity>
    </rule>

    That drops the severity down to 0, which tells PHPCS to stop generating
    that
    message. Give that a go and let me know if it works.

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

    [2012-11-07 00:50:55] happydog

    Description:
    ------------
    In 1.4.0 I had this instruction in my ruleset.xml:

    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
    <exclude-pattern>*</exclude-pattern>
    </rule>

    This successfully excluded the rule for all files.

    In 1.4.1, this no longer works, and the EndLine errors are reported.

    I tried adding type="relative" to the <exclude-pattern> tag, but this
    makes no difference.

    Expected result:
    ----------------
    An exclude pattern of * should block all files, regardless of whether in
    'absolute' or 'relative' mode.

    Actual result:
    --------------
    It doesn't seem to work in either mode.

    ------------------------------------------------------------------------
  • Pear at Nov 7, 2012 at 3:22 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19693&edit=1

    ID: 19693
    Comment by: pear@kennel17.co.uk
    Reported By: pear at kennel17 dot co dot uk
    Summary: exclude-patterns no longer work on specific messages
    Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: All
    Package Version: 1.4.1
    PHP Version: Irrelevant
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    <severity>0</severity> works fine, but glad to see you've fixed the
    other method too.

    Out of interest, why is the <severity> method 'best' - are they not
    equivalent?


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

    [2012-11-07 02:04:17] squiz

    -Status: Feedback
    +Status: Closed
    Fixed in github repo:
    https://github.com/squizlabs/PHP_CodeSniffer/commit/0181a097c94ab7b1a5c5a3fdb
    2aab60c470fa483

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

    [2012-11-07 02:02:38] squiz

    -Summary: exclude-pattern * no longer works
    +Summary: exclude-patterns no longer work on specific messages


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

    [2012-11-07 01:37:47] squiz

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    Yes, it should exclude all files, so I will look into it. But the best
    way of doing this is
    actually to use this:

    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
    <severity>0</severity>
    </rule>

    That drops the severity down to 0, which tells PHPCS to stop generating
    that
    message. Give that a go and let me know if it works.

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

    [2012-11-07 00:50:55] happydog

    Description:
    ------------
    In 1.4.0 I had this instruction in my ruleset.xml:

    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
    <exclude-pattern>*</exclude-pattern>
    </rule>

    This successfully excluded the rule for all files.

    In 1.4.1, this no longer works, and the EndLine errors are reported.

    I tried adding type="relative" to the <exclude-pattern> tag, but this
    makes no difference.

    Expected result:
    ----------------
    An exclude pattern of * should block all files, regardless of whether in
    'absolute' or 'relative' mode.

    Actual result:
    --------------
    It doesn't seem to work in either mode.

    ------------------------------------------------------------------------
  • Gsherwood at Nov 7, 2012 at 3:36 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19693&edit=1

    ID: 19693
    Updated by: gsherwood@squiz.net
    Reported By: pear at kennel17 dot co dot uk
    Summary: exclude-patterns no longer work on specific messages
    Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: All
    Package Version: 1.4.1
    PHP Version: Irrelevant
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    Thanks for getting back to me.

    I should have said "standard way" instead of "best way". The severity
    setting was
    built to exclude messages and sniffs for all files while the exclude
    patterns were built
    to exclude messages and sniffs for a subset of files.

    So if any improvements (perhaps performance improvements) are ever added
    in the
    future for excluding messages/sniffs from all files, it is better to be
    using the method
    that was designed for that purpose, although I'll always make sure the
    other way is
    also supported.

    Hope that makes sense.


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

    [2012-11-07 03:22:18] happydog

    <severity>0</severity> works fine, but glad to see you've fixed the
    other method too.

    Out of interest, why is the <severity> method 'best' - are they not
    equivalent?

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

    [2012-11-07 02:04:17] squiz

    -Status: Feedback
    +Status: Closed
    Fixed in github repo:
    https://github.com/squizlabs/PHP_CodeSniffer/commit/0181a097c94ab7b1a5c5a3fdb
    2aab60c470fa483

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

    [2012-11-07 02:02:38] squiz

    -Summary: exclude-pattern * no longer works
    +Summary: exclude-patterns no longer work on specific messages


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

    [2012-11-07 01:37:47] squiz

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    Yes, it should exclude all files, so I will look into it. But the best
    way of doing this is
    actually to use this:

    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
    <severity>0</severity>
    </rule>

    That drops the severity down to 0, which tells PHPCS to stop generating
    that
    message. Give that a go and let me know if it works.

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

    [2012-11-07 00:50:55] happydog

    Description:
    ------------
    In 1.4.0 I had this instruction in my ruleset.xml:

    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
    <exclude-pattern>*</exclude-pattern>
    </rule>

    This successfully excluded the rule for all files.

    In 1.4.1, this no longer works, and the EndLine errors are reported.

    I tried adding type="relative" to the <exclude-pattern> tag, but this
    makes no difference.

    Expected result:
    ----------------
    An exclude pattern of * should block all files, regardless of whether in
    'absolute' or 'relative' mode.

    Actual result:
    --------------
    It doesn't seem to work in either mode.

    ------------------------------------------------------------------------
  • Pear at Nov 7, 2012 at 3:46 am
    Edit report at https://pear.php.net/bugs/bug.php?id=19693&edit=1

    ID: 19693
    Comment by: pear@kennel17.co.uk
    Reported By: pear at kennel17 dot co dot uk
    Summary: exclude-patterns no longer work on specific messages
    Status: Closed
    Type: Bug
    Package: PHP_CodeSniffer
    Operating System: All
    Package Version: 1.4.1
    PHP Version: Irrelevant
    Assigned To: squiz
    Roadmap Versions:
    New Comment:

    OK - thanks for the explanation.


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

    [2012-11-07 03:35:59] squiz

    Thanks for getting back to me.

    I should have said "standard way" instead of "best way". The severity
    setting was
    built to exclude messages and sniffs for all files while the exclude
    patterns were built
    to exclude messages and sniffs for a subset of files.

    So if any improvements (perhaps performance improvements) are ever added
    in the
    future for excluding messages/sniffs from all files, it is better to be
    using the method
    that was designed for that purpose, although I'll always make sure the
    other way is
    also supported.

    Hope that makes sense.

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

    [2012-11-07 03:22:18] happydog

    <severity>0</severity> works fine, but glad to see you've fixed the
    other method too.

    Out of interest, why is the <severity> method 'best' - are they not
    equivalent?

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

    [2012-11-07 02:04:17] squiz

    -Status: Feedback
    +Status: Closed
    Fixed in github repo:
    https://github.com/squizlabs/PHP_CodeSniffer/commit/0181a097c94ab7b1a5c5a3fdb
    2aab60c470fa483

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

    [2012-11-07 02:02:38] squiz

    -Summary: exclude-pattern * no longer works
    +Summary: exclude-patterns no longer work on specific messages


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

    [2012-11-07 01:37:47] squiz

    -Status: Open
    +Status: Feedback
    -Assigned To:
    +Assigned To: squiz
    Yes, it should exclude all files, so I will look into it. But the best
    way of doing this is
    actually to use this:

    <rule ref="Squiz.WhiteSpace.SuperfluousWhitespace.EndLine">
    <severity>0</severity>
    </rule>

    That drops the severity down to 0, which tells PHPCS to stop generating
    that
    message. Give that a go and let me know if it works.

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

    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=19693

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedNov 7, '12 at 1:37a
activeNov 7, '12 at 3:46a
posts6
users2
websitepear.php.net

2 users in discussion

Gsherwood: 4 posts Pear: 2 posts

People

Translate

site design / logo © 2022 Grokbase