forked from buddypress/buddypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
66 lines (53 loc) · 2.88 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
59
60
61
62
63
64
65
66
<?xml version="1.0"?>
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="BuddyPress Coding Standards Configuration" xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/squizlabs/PHP_CodeSniffer/master/phpcs.xsd">
<description>BuddyPress Coding Standards Configuration.</description>
<!-- Load BuddyPress Coding standards -->
<rule ref="BuddyPress" />
<!--
Pass some flags to PHPCS:
p flag: Show progress of the run.
s flag: Show sniff codes in all reports.
v flag: Print processed files.
-->
<arg value="sp" />
<!-- Make it pretty. -->
<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"/>
<!-- Check against minimum PHP version, currently 7.0. -->
<config name="testVersion" value="7.0-"/>
<!-- Check against minimum WP version, currently 6.4. -->
<config name="minimum_wp_version" value="6.4"/>
<!-- What to exclude -->
<exclude-pattern>*/**/tests/</exclude-pattern>
<exclude-pattern>*/**/deprecated/</exclude-pattern>
<!-- Exclude those rules. -->
<rule ref="BuddyPress">
<exclude name="WordPress.WP.GlobalVariablesOverride.Prohibited" />
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.DynamicHooknameFound" />
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned" />
<exclude name="WordPress.PHP.YodaConditions.NotYoda" />
<exclude name="WordPress.NamingConventions.ValidPostTypeSlug.NotStringLiteral" />
<exclude name="WordPress.PHP.DontExtract.extract_extract" />
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_key" />
<exclude name="WordPress.DB.SlowDBQuery.slow_db_query_meta_value" />
<exclude name="WordPress.DateTime.RestrictedFunctions.date_date" />
<exclude name="WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedFunctionFound" />
<exclude name="Generic.WhiteSpace.ScopeIndent.Incorrect" />
<exclude name="Generic.WhiteSpace.ScopeIndent.IncorrectExact" />
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotValidated" />
<exclude name="WordPress.Security.ValidatedSanitizedInput.InputNotSanitized" />
<exclude name="WordPress.Security.NonceVerification.Missing" />
<exclude name="WordPress.Security.NonceVerification.Recommended" />
<exclude name="WordPress.Security.ValidatedSanitizedInput.MissingUnslash" />
<exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching" />
<exclude name="WordPress.DB.PreparedSQL.InterpolatedNotPrepared" />
<exclude name="WordPress.DB.PreparedSQL.NotPrepared" />
<exclude name="WordPress.DB.DirectDatabaseQuery.SchemaChange" />
<exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery" />
</rule>
</ruleset>