Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Merge pull request #283 from jrfnl/feature/adjust-example-phpcs-ruleset
Browse files Browse the repository at this point in the history
Improve example PHPCS ruleset
  • Loading branch information
westonruter authored Aug 14, 2018
2 parents ff033a1 + f2b18fc commit 32430f4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
19 changes: 16 additions & 3 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,31 @@
<ruleset name="WordPress Coding Standards for Plugins">
<description>Generally-applicable sniffs for WordPress plugins</description>

<rule ref="WordPress-Core" />
<rule ref="WordPress-Extra" />
<rule ref="WordPress-Docs" />

<!--
<config name="minimum_supported_wp_version" value="4.6"/>
<rule ref="WordPress.WP.I18n">
<properties>
<property name="text_domain" value="example,default" />
<property name="text_domain" type="array">
<element value="example"/>
<element value="default"/>
</property>
</properties>
</rule>
<rule ref="WordPress.NamingConventions.PrefixAllGlobals">
<properties>
<property name="prefixes" type="array">
<element value="example"/>
</property>
</properties>
</rule>
-->

<rule ref="PHPCompatibility"/>
<rule ref="PHPCompatibilityWP"/>
<config name="testVersion" value="5.2-"/>

<arg name="extensions" value="php"/>
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ echo 'node_modules' >> .gitignore
composer init # if you don't have a composer.json already
composer require php '>=5.2' # increase this if you need
composer require --dev "wp-coding-standards/wpcs=*"
composer require --dev "wimg/php-compatibility=*"
composer require --dev "phpcompatibility/phpcompatibility-wp=*"
composer require --dev dealerdirect/phpcodesniffer-composer-installer
echo 'vendor' >> .gitignore

Expand Down

0 comments on commit 32430f4

Please sign in to comment.