Add configuration for PHPCS
And execute it on Travis (allowing it to fail for now to prevent a lot of conflicts with `develop`).
This commit is contained in:
parent
13197123c5
commit
2be1b7d0b8
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10,3 +10,4 @@ build.xml export-ignore
|
||||
CONTRIBUTING.md export-ignore
|
||||
phpunit.xml.dist export-ignore
|
||||
run-all.sh export-ignore
|
||||
phpcs.xml.dist export-ignore
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@ lib/Doctrine/DBAL
|
||||
vendor/
|
||||
composer.lock
|
||||
/tests/Doctrine/Performance/history.db
|
||||
/.phpcs-cache
|
||||
|
@ -78,6 +78,11 @@ jobs:
|
||||
before_script: wget https://phpbench.github.io/phpbench/phpbench.phar https://phpbench.github.io/phpbench/phpbench.phar.pubkey
|
||||
script: php phpbench.phar run -l dots --report=default
|
||||
|
||||
- stage: Coding standard
|
||||
php: nightly
|
||||
script:
|
||||
- ./vendor/bin/phpcs
|
||||
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
||||
|
@ -28,7 +28,9 @@
|
||||
"symfony/console": "~3.0|~4.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^1.0",
|
||||
"phpunit/phpunit": "^6.0",
|
||||
"squizlabs/php_codesniffer": "^3.1",
|
||||
"symfony/yaml": "~3.4|~4.0"
|
||||
},
|
||||
"suggest": {
|
||||
|
24
phpcs.xml.dist
Normal file
24
phpcs.xml.dist
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<ruleset>
|
||||
<arg name="basepath" value="."/>
|
||||
<arg name="extensions" value="php"/>
|
||||
<arg name="parallel" value="80"/>
|
||||
<arg name="cache" value=".phpcs-cache"/>
|
||||
<arg name="colors" />
|
||||
|
||||
<!-- Ignore warnings and show progress of the run -->
|
||||
<arg value="np"/>
|
||||
|
||||
<file>lib</file>
|
||||
<file>tests</file>
|
||||
<file>tools</file>
|
||||
|
||||
<exclude-pattern>*/tests/Doctrine/Tests/Proxies/__CG__/*</exclude-pattern>
|
||||
|
||||
<rule ref="Doctrine" />
|
||||
|
||||
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
|
||||
<exclude-pattern>*/tests/*</exclude-pattern>
|
||||
</rule>
|
||||
</ruleset>
|
||||
|
Loading…
Reference in New Issue
Block a user