Skip to content

Commit

Permalink
Define the PHP coding standard checks
Browse files Browse the repository at this point in the history
  • Loading branch information
kasparsd authored and pereirinha committed Oct 6, 2020
1 parent e5fadfd commit 18d58a8
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<ruleset name="WordPress coding standards">
<config name="ignore_warnings_on_exit" value="1" /><!-- Ignore warnings for now. -->

<file>.</file><!-- Lint all PHP files by default. -->

<arg name="basepath" value="." /><!-- Show file paths relative to the project root. -->
<arg name="extensions" value="php" />
<arg name="colors" />
<arg value="s" /><!-- Show sniff codes in all reports. -->

<!-- Includes WordPress-Core, WordPress-Docs and WordPress-Extra rulesets. -->
<rule ref="WordPress">
<type>warning</type><!-- TODO Remove this after fixing all warnings. -->
</rule>

<!-- Include WP VIP coding standard checks -->
<rule ref="WordPress-VIP-Go" />
<rule ref="WordPressVIPMinimum" />

<exclude-pattern>/node_modules/</exclude-pattern>
<exclude-pattern>/vendor/</exclude-pattern>
<exclude-pattern>/build/</exclude-pattern>
</ruleset>

0 comments on commit 18d58a8

Please sign in to comment.