-
Notifications
You must be signed in to change notification settings - Fork 0
/
phpcs.xml.dist
51 lines (43 loc) · 1.8 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
<?xml version="1.0"?>
<ruleset name="Formello">
<description>Rules for Formello</description>
<arg name="extensions" value="php" />
<exclude-pattern>*/vendor/*</exclude-pattern>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/wordpress*/*</exclude-pattern>
<exclude-pattern>*/dist*/*</exclude-pattern>
<!-- Include the WordPress-Extra standard. -->
<rule ref="WordPress-Extra">
<!--
We may want a middle ground though. The best way to do this is add the
entire ruleset, then rule by rule, remove ones that don't suit a project.
We can do this by running `phpcs` with the '-s' flag, which allows us to
see the names of the sniffs reporting errors.
Once we know the sniff names, we can opt to exclude sniffs which don't
suit our project like so.
-->
<exclude name="WordPress.Files.FileName.InvalidClassFileName"/>
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase"/>
<exclude name="WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase"/>
<exclude name="WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned"/>
<exclude name="WordPress.PHP.StrictInArray.MissingTrueStrict"/>
<exclude name="Generic.Files.LineEndings" />
<exclude name="Generic.Formatting.MultipleStatementAlignment.NotSameWarning" />
</rule>
<!-- Let's also check that everything is properly documented. -->
<rule ref="WordPress-Docs"/>
<config name="minimum_supported_wp_version" value="5.0.0"/>
<config name="testVersion" value="5.6-"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" value="pdf-embed"/>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="pdf_embed"/>
</property>
</properties>
</rule>
</ruleset>