assets
1 year ago
dist
1 year ago
includes
1 year ago
languages
1 year ago
lib
4 years ago
templates
1 year ago
init.php
1 year ago
license.txt
2 years ago
phpcs.xml
3 years ago
yit-deactive-plugin.php
3 years ago
yit-functions.php
1 year ago
yit-plugin-registration-hook.php
5 years ago
yit-plugin.php
1 year ago
yit-woocommerce-compatibility.php
2 years ago
phpcs.xml
62 lines
| 1 | <?xml version="1.0"?> |
| 2 | <ruleset name="YITH Plugin Framework Coding Standards"> |
| 3 | <description>YITH Plugin Framework - PHP_CodeSniffer ruleset.</description> |
| 4 | |
| 5 | <file>.</file> |
| 6 | |
| 7 | <!-- Exclude paths --> |
| 8 | <exclude-pattern>Gruntfile.js</exclude-pattern> |
| 9 | <exclude-pattern>/assets/*</exclude-pattern> |
| 10 | <exclude-pattern>/bin/*</exclude-pattern> |
| 11 | <exclude-pattern>/dist/*</exclude-pattern> |
| 12 | <exclude-pattern>/languages/*</exclude-pattern> |
| 13 | <exclude-pattern>*/node_modules/*</exclude-pattern> |
| 14 | <exclude-pattern>*/tests/*</exclude-pattern> |
| 15 | <exclude-pattern>*/tools/*</exclude-pattern> |
| 16 | <exclude-pattern>*/vendor/*</exclude-pattern> |
| 17 | |
| 18 | <!-- Show progress, show the error codes for each message (source). --> |
| 19 | <arg value="ps"/> |
| 20 | |
| 21 | <!-- Strip the filepaths in reports down to the relevant bit. --> |
| 22 | <arg name="basepath" value="./"/> |
| 23 | |
| 24 | <!-- Check up to 8 files simultaneously. --> |
| 25 | <arg name="parallel" value="8"/> |
| 26 | |
| 27 | <!-- Only scan PHP files. --> |
| 28 | <arg name="extensions" value="php"/> |
| 29 | |
| 30 | <!-- Configs --> |
| 31 | <config name="minimum_supported_wp_version" value="5.2"/> |
| 32 | <!-- Check for cross-version support for PHP 5.6 and higher. --> |
| 33 | <config name="testVersion" value="7.0-"/> |
| 34 | |
| 35 | <!-- Rules --> |
| 36 | |
| 37 | <!-- WordPress --> |
| 38 | <rule ref="WordPress"> |
| 39 | <exclude name="WordPress.DB.DirectDatabaseQuery.NoCaching" /> |
| 40 | <exclude name="WordPress.DB.DirectDatabaseQuery.DirectQuery" /> |
| 41 | <exclude name="WordPress.DB.DirectDatabaseQuery.SchemaChange" /> |
| 42 | </rule> |
| 43 | |
| 44 | <rule ref="WordPress.Security.ValidatedSanitizedInput"> |
| 45 | <properties> |
| 46 | <property name="customSanitizingFunctions" type="array" value="wc_clean,wc_sanitize_tooltip,wc_format_decimal,wc_stock_amount,wc_sanitize_permalink,wc_sanitize_textarea"/> |
| 47 | </properties> |
| 48 | </rule> |
| 49 | |
| 50 | <rule ref="WordPress.Security.EscapeOutput"> |
| 51 | <properties> |
| 52 | <property name="customEscapingFunctions" type="array" value="wc_help_tip,wc_sanitize_tooltip,wc_selected,wc_kses_notice,wc_esc_json,wc_query_string_form_fields,wc_make_phone_clickable,yith_plugin_fw_html_data_to_string,yith_field_deps_data,yith_panel_field_deps_data,yith_plugin_fw_html_attributes_to_string"/> |
| 53 | </properties> |
| 54 | </rule> |
| 55 | |
| 56 | <rule ref="WordPress.Arrays.MultipleStatementAlignment"> |
| 57 | <properties> |
| 58 | <property name="maxColumn" value="200"/> |
| 59 | </properties> |
| 60 | </rule> |
| 61 | </ruleset> |
| 62 |