-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.phpcs.xml
63 lines (50 loc) · 2.08 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
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="WPGraphQL BuddyPress" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>PHP_CodeSniffer standard for the WPGraphQL BuddyPress extension.</description>
<!-- Load WordPress Coding standards -->
<rule ref="Alley-Interactive" />
<!--
Pass some flags to PHPCS:
p flag: Show progress of the run.
s flag: Show sniff codes in all reports.
-->
<arg value="ps" />
<!-- Enable colors in report -->
<arg name="colors" />
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
<arg name="cache" value=".phpcs/cache.json" />
<!-- Check 20 files in parallel. -->
<arg name="parallel" value="20" />
<!-- Set severity to 1 to see everything that isn't effectively turned off. -->
<arg name="severity" value="1" />
<!-- What to exclude -->
<exclude-pattern>*/**/tests/</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>
<!-- Configure the PHP version -->
<config name="testVersion" value="8.0-" />
<!-- Check against minimum WP version. -->
<config name="minimum_supported_wp_version" value="6.1" />
<!-- Name our classes files however we want. -->
<rule ref="WordPress.Files.FileName">
<properties>
<property name="strict_class_file_names" value="false"/>
</properties>
</rule>
<!-- Set the text domain for i18n. -->
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" type="array" value="wp-graphql-buddypress"/>
</properties>
</rule>
<!-- Silencing off rules. -->
<rule ref="WordPress">
<exclude name="WordPress.NamingConventions.PrefixAllGlobals"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase" />
</rule>
<!-- False positive. -->
<rule ref="WordPress-VIP-Go">
<exclude name="WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude"/>
</rule>
</ruleset>