Browse Source

feat(dev-tools): Mise en place phpcs+phpstan

pull/4836/head
JamesRezo 1 year ago
parent
commit
fec8c6ca22
  1. 7
      .gitignore
  2. 7
      composer.json
  3. 15
      phpcs.xml.dist
  4. 1322
      phpstan-baseline.neon
  5. 12
      phpstan.neon.dist

7
.gitignore vendored

@ -0,0 +1,7 @@
/vendor/
/composer.phar
/composer.lock
/phpcs.xml
/phpstan.neon
/.php_cs.cache
/.php_cs.txt

7
composer.json

@ -0,0 +1,7 @@
{
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"spip/coding-standards": "^1.2",
"phpstan/phpstan": "^0.12.98"
}
}

15
phpcs.xml.dist

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<ruleset>
<file>.</file>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>lang/*</exclude-pattern>
<exclude-pattern>lib/*</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>

1322
phpstan-baseline.neon

File diff suppressed because it is too large Load Diff

12
phpstan.neon.dist

@ -0,0 +1,12 @@
includes:
- phpstan-baseline.neon
parameters:
paths:
- .
excludePaths:
analyseAndScan:
- vendor
- lang
- lib
level: 0
Loading…
Cancel
Save