Composer and PHPCS config updates
This commit is contained in:
parent
1378b4c865
commit
8b5c920c98
@ -23,6 +23,25 @@
|
|||||||
"require-dev": {
|
"require-dev": {
|
||||||
"php": ">=5.3",
|
"php": ">=5.3",
|
||||||
"phpunit/phpunit": "*",
|
"phpunit/phpunit": "*",
|
||||||
"wp-coding-standards/wpcs": "~0.14.0"
|
"phpunit/php-code-coverage": "*",
|
||||||
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.4","slowprog/composer-copy-file": "~0.2",
|
||||||
|
"squizlabs/php_codesniffer": "^3.1",
|
||||||
|
"wimg/php-compatibility": "^8.0",
|
||||||
|
"wp-coding-standards/wpcs": "~0.14"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test-all": [
|
||||||
|
"@test",
|
||||||
|
"@test-cs"
|
||||||
|
],
|
||||||
|
"test": [
|
||||||
|
"phpunit"
|
||||||
|
],
|
||||||
|
"test-cs": [
|
||||||
|
"phpcs --standard=phpcs.xml -s"
|
||||||
|
],
|
||||||
|
"fix-cs": [
|
||||||
|
"phpcbf --standard=phpcs.xml"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
21
phpcs.xml
21
phpcs.xml
@ -2,8 +2,25 @@
|
|||||||
<ruleset name="WPLiveticker2">
|
<ruleset name="WPLiveticker2">
|
||||||
<description>Derived from WordPress Coding Standard</description>
|
<description>Derived from WordPress Coding Standard</description>
|
||||||
|
|
||||||
|
<!-- Config arguments -->
|
||||||
|
<arg value="psvn"/>
|
||||||
|
<arg name="colors"/>
|
||||||
|
|
||||||
|
<!-- Files to sniff -->
|
||||||
|
<file>wp-liveticker2.php</file>
|
||||||
|
<file>includes</file>
|
||||||
|
<file>views</file>
|
||||||
|
|
||||||
|
<!-- Compliance with WordPress Coding Standard -->
|
||||||
|
<config name="minimum_supported_wp_version" value="4.0"/>
|
||||||
<rule ref="WordPress">
|
<rule ref="WordPress">
|
||||||
<!-- Type hint checks mess up PHP 7 checks, while this plugin has compatibility level 5.5 and above. -->
|
<!-- Makes view HTML code messy -->
|
||||||
<exclude name="Squiz.Commenting.FunctionComment.ScalarTypeHintMissing"/>
|
<exclude name="Squiz.PHP.EmbeddedPhp.ContentBeforeEnd"/>
|
||||||
|
<exclude name="Squiz.PHP.EmbeddedPhp.ContentBeforeOpen"/>
|
||||||
|
<exclude name="Squiz.PHP.EmbeddedPhp.ContentAfterOpen"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
<!-- PHP compatibility level -->
|
||||||
|
<config name="testVersion" value="5.5-"/>
|
||||||
|
<rule ref="PHPCompatibility"/>
|
||||||
</ruleset>
|
</ruleset>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user