Add coding standard check

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2022-01-22 14:23:06 -03:00
parent 19ef2d84d4
commit 8577e70888
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
2 changed files with 31 additions and 1 deletions

View File

@ -46,3 +46,33 @@ jobs:
- name: "Run tests"
run: "vendor/bin/phpunit --no-coverage --disallow-test-output --exclude-group selenium"
coding-standards:
name: "Check coding standards"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "7.1"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
ini-values: "memory_limit=-1"
- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"
- name: "Check coding standards"
run: |
vendor/bin/phpcs --config-set installed_paths ../../phpmyadmin/coding-standard
vendor/bin/phpcs

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?>
<ruleset name="phpMyAdmin Coding Standard">
<rule ref="./vendor/phpmyadmin/coding-standard/PMAStandard/ruleset.xml">
<rule ref="PMAStandard">
<exclude name="Generic.Metrics.NestingLevel.TooHigh"/>
<exclude name="PSR1.Files.SideEffects.FoundWithSymbols"/>
<exclude name="PSR1.Classes.ClassDeclaration.MissingNamespace"/>