-
Notifications
You must be signed in to change notification settings - Fork 38
/
.phpcs.xml.dist
58 lines (52 loc) · 3.02 KB
/
.phpcs.xml.dist
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
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for Plugin">
<description>Sniffs for WordPress plugins</description>
<file>.</file>
<!-- Exclude these -->
<exclude-pattern type="relative">bin/*</exclude-pattern>
<exclude-pattern type="relative">build/*</exclude-pattern>
<exclude-pattern type="relative">dist/*</exclude-pattern>
<exclude-pattern type="relative">vendor/*</exclude-pattern>
<exclude-pattern type="relative">vendor-prefixed/*</exclude-pattern>
<exclude-pattern type="relative">tests/*</exclude-pattern>
<arg name="extensions" value="php"/>
<!-- Show progress and sniff codes in all reports -->
<arg value="ps"/>
<!-- https://github.com/PHPCompatibility/PHPCompatibility#sniffing-your-code-for-compatibility-with-specific-php-versions -->
<config name="testVersion" value="7.2-" />
<!-- https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties -->
<config name="minimum_supported_wp_version" value="5.8"/>
<config name="text_domain" value="popup-maker, default" />
<!-- Force short syntax arrays. -->
<rule ref="CodeAtlantic">
<rule ref="Universal.Arrays.DisallowLongArraySyntax"/>
<exclude name="Universal.Arrays.DisallowShortArraySyntax" />
<!-- Temporary due to usage of CONSTANT like names for core variables. -->
<exclude name="WordPress.NamingConventions.ValidVariableName.PropertyNotSnakeCase" />
<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase" />
<!-- Allow PSR file name & class names. -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<!-- Temporary to prioritize non-trivial CS issues.-->
<exclude name="Squiz.Commenting.FunctionComment.MissingParamType" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamTag" />
<exclude name="Squiz.Commenting.VariableComment.MissingVar" />
<exclude name="Squiz.Commenting.VariableComment.EmptyVar" />
<exclude name="Squiz.Commenting.ClassComment.SpacingAfter" />
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching" />
<exclude name="Squiz.Commenting.InlineComment.InvalidEndChar" />
<exclude name="Generic.Commenting.DocComment.MissingShort" />
<exclude name="Generic.Commenting.DocComment.ShortNotCapital" />
<exclude name="Squiz.Commenting.FunctionComment.Missing" />
<exclude name="Squiz.Commenting.FileComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
<exclude name="Generic.Commenting.DocComment.Empty" />
<exclude name="Squiz.Commenting.VariableComment.Missing" />
<exclude name="Squiz.Commenting.FunctionComment.EmptyThrows" />
<exclude name="Generic.CodeAnalysis.UnusedFunctionParameter" />
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop" />
<exclude name="Squiz.PHP.CommentedOutCode.Found" />
<exclude name="Generic.CodeAnalysis.EmptyStatement.DetectedIf" />
<exclude name="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents" />
</rule>
</ruleset>