Browse Source
feat(dev-tools): Mise en place phpcs+phpstan (#4614)
feat(dev-tools): Mise en place phpcs+phpstan (#4614)
Co-authored-by: JamesRezo <james@rezo.net> Reviewed-on: spip/aide#4614 Co-authored-by: JamesRezo <jamesrezo@noreply.git.spip.net> Co-committed-by: JamesRezo <jamesrezo@noreply.git.spip.net>master
6 changed files with 110 additions and 14 deletions
-
7.gitignore
-
7composer.json
-
28inc/aide.php
-
14phpcs.xml.dist
-
57phpstan-baseline.neon
-
11phpstan.neon.dist
@ -0,0 +1,7 @@ |
|||
/vendor/ |
|||
/composer.phar |
|||
/composer.lock |
|||
/phpcs.xml |
|||
/phpstan.neon |
|||
/.php_cs.cache |
|||
/.php_cs.txt |
@ -0,0 +1,7 @@ |
|||
{ |
|||
"require-dev": { |
|||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", |
|||
"spip/coding-standards": "^1.2", |
|||
"phpstan/phpstan": "^0.12.98" |
|||
} |
|||
} |
@ -0,0 +1,14 @@ |
|||
<?xml version="1.0"?> |
|||
<ruleset> |
|||
<file>.</file> |
|||
<exclude-pattern>vendor/*</exclude-pattern> |
|||
<exclude-pattern>lang/*</exclude-pattern> |
|||
|
|||
<rule ref="SPIP41"/> |
|||
|
|||
<config name="ignore_warnings_on_exit" value="1"/> |
|||
<arg name="cache" value=".php_cs.cache"/> |
|||
<arg name="report-full" value=".php_cs.txt"/> |
|||
<arg name="report-summary"/> |
|||
<arg value="s"/> |
|||
</ruleset> |
@ -0,0 +1,57 @@ |
|||
parameters: |
|||
ignoreErrors: |
|||
- |
|||
message: "#^Function _T not found\\.$#" |
|||
count: 6 |
|||
path: inc/aide.php |
|||
|
|||
- |
|||
message: "#^Function aide_lang_dir not found\\.$#" |
|||
count: 1 |
|||
path: inc/aide.php |
|||
|
|||
- |
|||
message: "#^Function find_in_path not found\\.$#" |
|||
count: 1 |
|||
path: inc/aide.php |
|||
|
|||
- |
|||
message: "#^Function generer_url_ecrire not found\\.$#" |
|||
count: 1 |
|||
path: inc/aide.php |
|||
|
|||
- |
|||
message: "#^Function http_img_pack not found\\.$#" |
|||
count: 1 |
|||
path: inc/aide.php |
|||
|
|||
- |
|||
message: "#^Function include_spip not found\\.$#" |
|||
count: 3 |
|||
path: inc/aide.php |
|||
|
|||
- |
|||
message: "#^Function lire_fichier not found\\.$#" |
|||
count: 1 |
|||
path: inc/aide.php |
|||
|
|||
- |
|||
message: "#^Function parametre_url not found\\.$#" |
|||
count: 2 |
|||
path: inc/aide.php |
|||
|
|||
- |
|||
message: "#^Function pipeline not found\\.$#" |
|||
count: 1 |
|||
path: inc/aide.php |
|||
|
|||
- |
|||
message: "#^Undefined variable\\: \\$content$#" |
|||
count: 2 |
|||
path: inc/aide.php |
|||
|
|||
- |
|||
message: "#^Function include_spip not found\\.$#" |
|||
count: 1 |
|||
path: prive/squelettes/contenu/aide_fonctions.php |
|||
|
@ -0,0 +1,11 @@ |
|||
includes: |
|||
- phpstan-baseline.neon |
|||
|
|||
parameters: |
|||
paths: |
|||
- . |
|||
excludePaths: |
|||
analyseAndScan: |
|||
- vendor |
|||
- lang |
|||
level: 0 |
Write
Preview
Loading…
Cancel
Save
Reference in new issue