-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathphpcs.xml.dist
More file actions
54 lines (40 loc) · 2.02 KB
/
phpcs.xml.dist
File metadata and controls
54 lines (40 loc) · 2.02 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
<?xml version="1.0"?>
<ruleset name="FAIR coding standards">
<description>Coding standards for the FAIR Beacon plugin</description>
<!-- Only scan PHP files. -->
<arg name="extensions" value="php" />
<!-- Whenever possible, cache the scan results and re-use those for unchanged files on the next scan. -->
<arg name="cache" value=".cache/phpcs.json"/>
<!-- Path to strip from the front of file paths inside reports (displays shorter paths) -->
<arg name="basepath" value="." />
<!-- Show sniff codes in all reports. -->
<arg value="ps"/>
<!-- Set a minimum PHP version for PHPCompatibility -->
<config name="testVersion" value="8.3-" />
<!-- Set the minimum support WordPress version -->
<config name="minimum_supported_wp_version" value="6.4"/>
<!-- Set the text domain -->
<config name="text_domain" value="fair-beacon"/>
<!-- Ignore PHP-related errors. -->
<ini name="error_reporting" value="E_ALL & ~E_DEPRECATED" />
<!-- Use HM Coding Standards -->
<rule ref="vendor/humanmade/coding-standards">
<!-- Deprecated in PHPCS. Removal in 4.0.0 -->
<exclude name="Generic.Functions.CallTimePassByReference" />
<!-- Scanning CSS/JS files is deprecated in PHPCS. Removal in 4.0.0 -->
<exclude name="HM.Debug.ESLint" />
<!-- Allow use of error_log and var_dump for debugging purposes -->
<exclude name="WordPress.PHP.DevelopmentFunctions.error_log_var_dump" />
<!-- Don't blame the calling code for non-snake case properties. -->
<exclude name="WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase" />
</rule>
<!-- Exclude the main plugin file from namespace file rules -->
<rule ref="HM.Files.FunctionFileName.WrongFile">
<exclude-pattern>plugin\.php</exclude-pattern>
</rule>
<!-- Don't require snake case variable names for JSON-related classes. -->
<rule ref="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase">
<exclude-pattern>inc/plc/class-operation\.php</exclude-pattern>
<exclude-pattern>inc/plc/class-signedoperation\.php</exclude-pattern>
</rule>
</ruleset>