forked from wp-media/imagify-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml
47 lines (41 loc) · 2.68 KB
/
phpcs.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?xml version="1.0"?>
<ruleset name="Imagify Tools">
<description>A WordPress plugin helping debug in Imagify.</description>
<arg name="extensions" value="php"/>
<!--<arg value="s"/>-->
<file>.</file>
<exclude-pattern>tests.php</exclude-pattern>
<!-- Check for cross-version support for PHP 5.2 and higher + WP 3.7 and higher. -->
<config name="testVersion" value="5.2-"/>
<config name="minimum_supported_wp_version" value="3.7"/>
<!-- Run against the PHPCompatibility ruleset dedicated to WP. -->
<rule ref="PHPCompatibilityWP">
<include-pattern>*\.php$</include-pattern>
<exclude name="PHPCompatibility.FunctionNameRestrictions.RemovedMagicAutoload.Found"/><!-- __autoload() function is defined in a separate file. -->
</rule>
<!-- Run against the WordPress ruleset. -->
<rule ref="WordPress">
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma"/><!-- Completely broken. -->
<exclude name="Generic.PHP.NoSilencedErrors.Discouraged"/><!-- I've been told that silence is golden. -->
<exclude name="Squiz.Commenting.FileComment.Missing"/><!-- Nope nope nope. -->
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/><!-- No. Simply, no. -->
<exclude name="Squiz.PHP.CommentedOutCode.Found"/><!-- LOL, this thing is totally broken. -->
<exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery"/><!-- LOL. Yeah, sure. -->
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching"/><!-- Using static vars IS caching. -->
<exclude name="WordPress.PHP.DevelopmentFunctions.prevent_path_disclosure_error_reporting"/><!-- We 👏 Need 👏 It 👏 ! -->
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_error_reporting"/><!-- Same. -->
<exclude name="WordPress.PHP.DiscouragedPHPFunctions.runtime_configuration_ini_set"/><!-- Same. -->
<exclude name="WordPress.PHP.NoSilencedErrors.Discouraged"/><!-- Silence is golden. -->
<exclude name="WordPress.WP.AlternativeFunctions.curl_curl_version"/><!-- Same. -->
<exclude name="WordPress.WP.CapitalPDangit.Misspelled"/><!-- False positives. -->
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited"/><!-- Stop using global vars and I'll stop overriding them. Deal? -->
<exclude name="WordPress.WP.PostsPerPage.posts_per_page_posts_per_page"/><!-- Should I use 100000 DB queries in a loop then? -->
<exclude name="WordPress.Security.EscapeOutput.OutputNotEscaped"/>
<exclude name="WordPress.Security.EscapeOutput.UnsafePrintingFunction"/>
</rule>
<!--<rule ref="WordPress.CSRF.NonceVerification">
<properties>
<property name="customNonceVerificationFunctions" value="check_nonce_and_user" type="array"/>
</properties>
</rule>-->
</ruleset>