Add phpcs to the Travis build

Adds composer test command.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2019-12-20 22:10:42 -03:00
parent beb304c947
commit e69b22e9f7
3 changed files with 32 additions and 1 deletions

View File

@ -119,6 +119,13 @@ matrix:
env: CI_MODE=test
install:
- composer install --no-interaction --ignore-platform-reqs
- php: "7.1"
before_script: skip
after_script: skip
after_success: skip
script:
- test/ci-lint
- vendor/bin/phpcs --standard=phpcs.xml.dist
allow_failures:
- php: "nightly"

View File

@ -93,5 +93,11 @@
"branch-alias": {
"dev-master": "4.9.x-dev"
}
},
"scripts": {
"test": [
"phpcs",
"phpunit --color=always"
]
}
}

View File

@ -1,6 +1,24 @@
<?xml version="1.0"?>
<ruleset name="phpMyAdmin Coding Standard">
<rule ref="./vendor/phpmyadmin/coding-standard/PMAStandard/ruleset.xml"/>
<rule ref="./vendor/phpmyadmin/coding-standard/PMAStandard/ruleset.xml">
<exclude name="Generic.Metrics.NestingLevel.TooHigh"/>
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>
<exclude name="PSR1.Classes.ClassDeclaration.MultipleClasses"/>
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps"/>
<exclude name="PMAStandard.Commenting.FileComment.Missing"/>
<exclude name="PMAStandard.Commenting.ClassComment.Missing"/>
<exclude name="PMAStandard.Commenting.ClassComment.MissingPackageTag"/>
<exclude name="PMAStandard.Commenting.FunctionComment.Missing"/>
<exclude name="PMAStandard.Commenting.FunctionComment.MissingParamComment"/>
<exclude name="PMAStandard.Commenting.FunctionComment.MissingParamName"/>
<exclude name="PMAStandard.Commenting.FunctionComment.MissingParamTag"/>
<exclude name="PMAStandard.Commenting.FunctionComment.MissingReturn"/>
<exclude name="PMAStandard.Commenting.FunctionComment.ExtraParamComment"/>
<exclude name="PMAStandard.Commenting.FunctionComment.ParamNameNoMatch"/>
<exclude name="PMAStandard.Commenting.FunctionComment.SpacingAfter"/>
<exclude name="PMAStandard.Files.SpacesAroundConcat.Found"/>
</rule>
<arg value="sp"/>
<arg name="colors"/>