-
Notifications
You must be signed in to change notification settings - Fork 1
/
phpcs.xml
88 lines (74 loc) · 3.37 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0"?>
<ruleset name="WordPress PageFlash">
<description>WordPress coding standards for the PageFlash plugin.</description>
<rule ref="PHPCompatibility"/>
<!-- Sets the minimum supported WP version to 6.4, which is over a year. -->
<config name="minimum_supported_wp_version" value="6.4" />
<!-- For CI, don't fail on warnings -->
<config name="ignore_warnings_on_exit" value="1"/>
<rule ref="WordPress-Core">
<exclude name="WordPress.PHP.YodaConditions" />
</rule>
<rule ref="WordPress-Docs"/>
<!-- <arg name="basepath" value="."/> -->
<arg name="extensions" value="php"/>
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>build/</exclude-pattern>
<exclude-pattern>node_modules/</exclude-pattern>
<exclude-pattern>tests/*.php</exclude-pattern>
<rule ref="WordPress-Extra">
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="Generic.Formatting.MultipleStatementAlignment" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax.Found" />
<exclude name="Squiz.Commenting.ClassComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
<exclude name="Squiz.Commenting.VariableComment.Missing" />
<exclude name="Squiz.PHP.EmbeddedPhp.ContentBeforeOpen" />
<exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterOpen" />
<exclude name="Squiz.PHP.EmbeddedPhp.ContentBeforeEnd" />
<exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterEnd" />
<exclude name="WordPress.Arrays.MultipleStatementAlignment" />
<exclude name="WordPress.CSRF.NonceVerification.NoNonceVerification" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.Security.NonceVerification.NoNonceVerification"/>
<exclude name="WordPress.Security.NonceVerification.Missing"/>
<exclude name="WordPress.WP.I18n.MissingTranslatorsComment" />
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralSingle" />
<exclude name="WordPress.WP.I18n.NonSingularStringLiteralPlural" />
<exclude name="WordPress.WP.EnqueuedResources.NonEnqueuedStylesheet" />
<exclude name="PEAR.Functions.FunctionCallSignature.ContentAfterOpenBracket" />
<exclude name="PEAR.Functions.FunctionCallSignature.MultipleArguments" />
<exclude name="PEAR.Functions.FunctionCallSignature.CloseBracketLine" />
</rule>
<rule ref="WordPress.WP.DeprecatedFunctions">
<properties>
<property name="minimum_supported_version" value="5.5" />
</properties>
</rule>
<rule ref="WordPress.NamingConventions.ValidHookName">
<properties>
<property name="additionalWordDelimiters" value="/-" />
</properties>
</rule>
<!-- Our Textdomain for i18n -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" value="pageflash" />
</properties>
</rule>
<!-- Sometimes we need to override globals -->
<rule ref="WordPress.WP.GlobalVariablesOverride.OverrideProhibited">
<type>warning</type>
</rule>
<!-- Make missing translator comment a warning. -->
<rule ref="WordPress.WP.I18n.MissingTranslatorsComment">
<type>warning</type>
</rule>
<!--
Prevent errors caused by WordPress Coding Standards not supporting PHP 8.0+.
See https://github.com/WordPress/WordPress-Coding-Standards/issues/2035
-->
<ini name="error_reporting" value="E_ALL & ~E_DEPRECATED" />
</ruleset>