-
-
Notifications
You must be signed in to change notification settings - Fork 493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new core.ruleset.xml excluding extra sniffs, and other fixes #64
Conversation
Fixes #58 |
Not sure of the file name though.. feel free to suggest a better name. |
@shadyvb how did you come up with the list of core rules to include? |
@westonruter Those were all the rules at the time minus ones that have been declared as extra in issues. Probably need to update it to include new sniffs introduced in later commits. |
@shadyvb I appended a commit to this for allowing code to whitelist non-cached DB calls. Please review. |
Ensure that brace appears on same line as preceding closing parenthesis
@shadyvb so I ended up adding several commits, as you can see, as I was working on a base ruleset XML for plugin development, and trying it out in Widget Customizer. In the course of doing this I found some issues, so I fixed them up here. Please review. |
Add new core.ruleset.xml excluding extra sniffs, and other fixes
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Related: * `Universal.Namespaces.OneDeclarationPerFile` - upstream Extra WordPress#6 * `Universal.Namespaces.DisallowCurlyBraceSyntax` - upstream Extra WordPress#4 * `Universal.Namespaces.DisallowDeclarationWithoutName` - upstream Extra WordPress#50 * `Universal.UseStatements.NoLeadingBackslash` - upstream Extra WordPress#46 * `Universal.UseStatements.LowercaseFunctionConst` - upstream Extra WordPress#58 * `Universal.Constants.LowercaseClassResolutionKeyword` - upstream Extra WordPress#72 * `Generic.WhiteSpace.IncrementDecrementSpacing` - issue WordPress#1511, upstream PHPCS WordPress#2172, WordPress#2174 * `Universal.Operators.DisallowStandalonePostIncrementDecrement` - upstream Extra WordPress#65 * `Universal.Constants.UppercaseMagicConstants` - upstream Extra WordPress#64
Fixes #58