-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathphpcs.xml
More file actions
79 lines (65 loc) · 3.28 KB
/
phpcs.xml
File metadata and controls
79 lines (65 loc) · 3.28 KB
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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="WP GitHub Updater" xsi:noNamespaceSchemaLocation="vendor/squizlabs/php_codesniffer/phpcs.xsd">
<description>The custom ruleset for WP GitHub Updater library.</description>
<!-- For help in understanding this file: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml -->
<!-- For help in using PHPCS: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
<!-- ** WHAT TO SCAN ** -->
<file>src</file>
<!-- Ignoring Files and Folders: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-files-and-folders -->
<exclude-pattern>/vendor/*</exclude-pattern>
<exclude-pattern>/wordpress/*</exclude-pattern>
<!-- ** HOW TO SCAN ** -->
<arg value="sp"/><!-- Show sniff and progress -->
<arg name="colors"/><!-- Show results with colors -->
<arg name="parallel" value="50"/><!-- Enables parallel processing when available for faster results. -->
<arg name="extensions" value="php"/><!-- Limit to PHP files -->
<!-- Rules: Check PHP version compatibility - see https://github.com/PHPCompatibility/PHPCompatibilityWP -->
<rule ref="PHPCompatibility"/>
<config name="testVersion" value="7.4-"/>
<config name="minimum_supported_wp_version" value="6.0"/>
<rule ref="WordPress">
<exclude name="Universal.Arrays.DisallowShortArraySyntax.Found"/>
<exclude name="Universal.Operators.DisallowShortTernary.Found"/>
<exclude name="Universal.NamingConventions.NoReservedKeywordParameterNames.defaultFound"/>
<exclude name="Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma"/>
<exclude name="Generic.PHP.NoSilencedErrors.Discouraged"/>
<exclude name="PEAR.Functions.FunctionCallSignature.Indent"/>
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace"/>
<exclude name="Squiz.Commenting.FileComment.Missing"/>
<exclude name="Squiz.Commenting.FileComment.MissingPackageTag"/>
<exclude name="Squiz.PHP.CommentedOutCode.Found"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="Generic.Arrays.DisallowShortArraySyntax" />
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment" />
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound" />
<exclude name="WordPress.WP.Capabilities.Unknown" />
</rule>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array">
<element value="wp-github-updater" />
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="Honemo" />
<element value="honemo" />
</property>
</properties>
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedNamespaceFound" />
</rule>
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false" />
</properties>
</rule>
<rule ref="WordPress-Docs">
<exclude name="Squiz.Commenting.FileComment.Missing"/>
<exclude name="Squiz.Commenting.ClassComment.Missing"/>
</rule>
<rule ref="WordPress.PHP.YodaConditions" />
<!-- Enforce short array syntax: `[]` in place of `array()`. -->
<rule ref="Generic.Arrays.DisallowLongArraySyntax" />
</ruleset>