Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

codesniffer using pear standard ignore line indent

using codesniffer with pear standard. I got over 20tsd errors cause of line indents. I use tab-stops for indenting. I try to disable that check but I failed.

I removed the last rule from the generic standards in the ruleset.xml for the pear standard. Yet the indenting is still considered an error.

How do I remove the indention checks completely for the pear standard?

like image 684
steros Avatar asked Jan 20 '12 14:01

steros


1 Answers

It should work, so you should definitely try to understand why tweaking your ruleset.xml file doesn't work in your environment, otherwise you'll be missing many features from CodeSniffer.

As a reminder, here are the two options:

  1. Either you explicitly exclude the sniff in your ruleset :

    <rule ref="PEAR">
        <exclude name="PEAR.WhiteSpace.ScopeIndent" />
    </rule>
    
  2. Or you mute down a specific error message, resulting in the rule actually being executed for potential other error messages :

    <rule ref="PEAR.WhiteSpace.ScopeIndent.Incorrect">
        <severity>0</severity>
    </rule>
    
like image 89
Tom Desp Avatar answered Sep 21 '22 17:09

Tom Desp