How to ignore some checks on PHP Code Sniffer on Eclipse?

I started using the PHP Code Sniffer extension for Eclipse (Kepler SR1 Build id: 20130919-0819), but I have a usability problem. Due to how the code sniffer works in eclipse, it marks a file with an error with the same icon as a file with a PHP encoding error. The same goes for warnings.

My problem is that due to some things on the code base I'm working on, we have many variables (which I cannot change) that are not in camel format but have an underscore. Because of this, eclipse reports that almost every page of the project has problems. You can check the assigned image for an example.

So my question is: how do I turn off the verification of this SNIFF (the variable is not in the actual case of a camel)?

enter image description here

+3
1

ruleset.xml , .

<?xml version="1.0"?> 
<ruleset name="My Standards"> 
    <description>My Coding Standards enforcement rule set for PHP_CodeSniffer</description> 
    <rule ref="PSR2.Classes.PropertyDeclaration" /> 
    <rule ref="PSR2.ControlStructures.ElseIfDeclaration" /> 
    <rule ref="PSR2.Files.EndFileNewline" /> 
    <rule ref="PSR2.Methods.MethodDeclaration" /> 
    <rule ref="PSR2.Namespaces.NamespaceDeclaration" />    
    <rule ref="PSR2.Namespaces.UseDeclaration" />  

    <rule ref="Squiz.Arrays.ArrayBracketSpacing" /> 
    <rule ref="Squiz.Arrays.ArrayDeclaration" /> 

    <rule ref="Squiz.PHP.DisallowSizeFunctionsInLoops" />  


    <!-- Removing Sniffs from Generic as we do not want these -->
    <rule ref="Generic"> 
        <exclude name="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" />       
        <exclude name="Generic.Commenting.Fixme" /> 
        <exclude name="Generic.Commenting.Todo" /> 
        <exclude name="Generic.Files.EndFileNoNewline" /> 
        <exclude name="Generic.Files.LineEndings" /> 
        <exclude name="Generic.Files.LineLength" /> 
        <exclude name="Generic.Files.OneClassPerFile" /> 
        <exclude name="Generic.Files.OneInterfacePerFile" /> 
        <exclude name="Generic.Formatting.NoSpaceAfterCast" /> 
        <exclude name="Generic.Functions.OpeningFunctionBraceKernighanRitchie" /> 
        <exclude name="Generic.NamingConventions.CamelCapsFunctionName" /> 
        <exclude name="Generic.PHP.ClosingPHPTag" /> 
        <exclude name="Generic.PHP.LowerCaseConstant" /> 
        <exclude name="Generic.VersionControl.SubversionProperties" /> 
        <exclude name="Generic.WhiteSpace.DisallowSpaceIndent" /> 
        <exclude name="Generic.WhiteSpace.DisallowTabIndent" /> 
        <exclude name="Generic.Files.LowercasedFilename" /> 
    </rule> 
</ruleset> 
+7

All Articles