wip adjust analysis

This commit is contained in:
Leon 2021-01-15 12:18:38 +10:00
parent 6ee1bf0498
commit 7472a0fff0
3 changed files with 9 additions and 7 deletions

View file

@ -44,9 +44,6 @@
}
},
"config": {
"platform": {
"php": "7.2.17"
},
"preferred-install": {
"*": "dist"
},
@ -54,13 +51,16 @@
},
"scripts": {
"phpstan": "php -d memory_limit=-1 ./vendor/bin/phpstan analyse",
"phpcs": "vendor/bin/phpcs --standard=./tools/phpcs.xml --ignore=*/tests/*,*/admin/*,**/coverage/*,*.js,*/vendor/*,*/views/*.php ./",
"phpcbf": "vendor/bin/phpcbf --standard=./tools/phpcs.xml --ignore=*/js/*,*/tests/*,*/admin/*,*/coverage/*,*.js,*/vendor/*,*/views/*.php ./",
"phpunit": "vendor/bin/phpunit ./tests/unit/",
"phpcs": "vendor/bin/phpcs --standard=./tools/phpcs.xml --ignore='*/tests/*,*/vendor/*' .",
"phpcbf": "vendor/bin/phpcbf --standard=./tools/phpcs.xml --ignore='*/tests/*,*/vendor/*' .",
"php73": "vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.3 --ignore='/tests/*,/vendor/*' ./",
"php74": "vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.4 --ignore='/tests/*,/vendor/*' ./",
"lint": "vendor/bin/parallel-lint --exclude vendor .",
"test": [
"@lint",
"@phpcs",
"@php73",
"@php74",
"@phpstan"
],
"build": "/bin/sh tools/build_release.sh"

View file

@ -4,9 +4,11 @@ includes:
- vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
level: max
phpVersion: 80000
inferPrivatePropertyTypeFromConstructor: true
paths:
- %currentWorkingDirectory%/src/
- %currentWorkingDirectory%/views/
- %currentWorkingDirectory%/wp2static-addon-netlify.php
scanFiles:
- %currentWorkingDirectory%/tests/phpstan/bootstrap.php

View file

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<ruleset name="WP2Static">
<description>WP2Static Project Coding Standard</description>
<config name="testVersion" value="7.2-"/>
<config name="testVersion" value="7.3-"/>
<!--
Note: Applied WP standard override to allow tabs instead
of spaces, however, PHP CBF is using 4 spaces - Gray