give
Last commit date
.storybook
5 years ago
assets
5 years ago
blocks
5 years ago
includes
5 years ago
languages
5 years ago
sample-data
6 years ago
src
5 years ago
templates
5 years ago
vendor
5 years ago
.distignore
5 years ago
.gitattributes
5 years ago
.stylelintignore
6 years ago
changelog.txt
5 years ago
give.php
5 years ago
license.txt
6 years ago
phpcs.xml.dist
5 years ago
readme.txt
5 years ago
uninstall.php
5 years ago
wpml-config.xml
6 years ago
phpcs.xml.dist
69 lines
| 1 | <?xml version="1.0"?> |
| 2 | <ruleset name="GiveWP Coding Standards"> |
| 3 | <description>We love clean code for GiveWP. This will let us enforce that easily.</description> |
| 4 | |
| 5 | <!-- |
| 6 | ############################################################################# |
| 7 | COMMAND LINE ARGUMENTS |
| 8 | https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml |
| 9 | ############################################################################# |
| 10 | --> |
| 11 | |
| 12 | <file>.</file> |
| 13 | |
| 14 | <!-- Exclude directories we don't want checked. --> |
| 15 | <exclude-pattern>/assets/*</exclude-pattern> |
| 16 | <exclude-pattern>/includes/libraries/*</exclude-pattern> |
| 17 | <exclude-pattern>/languages/*</exclude-pattern> |
| 18 | <exclude-pattern>/sample-data/*</exclude-pattern> |
| 19 | <exclude-pattern>/tests/*</exclude-pattern> |
| 20 | |
| 21 | <!-- Exclude directories related to external dependencies. --> |
| 22 | <exclude-pattern>/node_modules/*</exclude-pattern> |
| 23 | <exclude-pattern>/vendor/*</exclude-pattern> |
| 24 | |
| 25 | <!-- Show progress, show the error codes for each message (source). --> |
| 26 | <arg value="ps"/> |
| 27 | |
| 28 | <!-- Only check PHP files. --> |
| 29 | <arg name="extensions" value="php"/> |
| 30 | |
| 31 | <!-- Strip the filepaths down to the relevant bit. --> |
| 32 | <arg name="basepath" value="./"/> |
| 33 | |
| 34 | <!-- Check up to 8 files simultaneously. --> |
| 35 | <arg name="parallel" value="8"/> |
| 36 | |
| 37 | <!-- Show colourized output. --> |
| 38 | <arg name="colors"/> |
| 39 | |
| 40 | |
| 41 | <!-- |
| 42 | ############################################################################# |
| 43 | USE THE WPCS AND THE PHPCOMPATIBILITYWP RULESETS |
| 44 | ############################################################################# |
| 45 | --> |
| 46 | |
| 47 | <!-- Bring in WP rules. --> |
| 48 | <rule ref="WordPress-Core"> |
| 49 | <exclude name="WordPress.Files.FileName.InvalidClassFileName" /> |
| 50 | <exclude name="WordPress.WP.I18n.MissingTranslatorsComment" /> |
| 51 | <exclude name="Generic.Arrays.DisallowShortArraySyntax" /> |
| 52 | </rule> |
| 53 | |
| 54 | <rule ref="Generic.Arrays.DisallowLongArraySyntax.Found"> |
| 55 | <type>warning</type> |
| 56 | </rule> |
| 57 | |
| 58 | <rule ref="WordPress.WP.I18n"> |
| 59 | <properties> |
| 60 | <property name="text_domain" type="array" value="give"/> |
| 61 | </properties> |
| 62 | </rule> |
| 63 | |
| 64 | <!-- Test for code compatibility with PHP 5.6 and higher. --> |
| 65 | <config name="testVersion" value="5.6-"/> |
| 66 | <rule ref="PHPCompatibilityWP"/> |
| 67 | |
| 68 | </ruleset> |
| 69 |