mirror of https://github.com/nextcloud/calendar
Use Standard Nextcloud Coding Style for PHP
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
parent
9680032c55
commit
99ebda920f
|
@ -52,3 +52,19 @@ jobs:
|
|||
run: npm run lint
|
||||
env:
|
||||
CI: true
|
||||
|
||||
php-cs-fixer:
|
||||
name: php-cs check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@master
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@master
|
||||
with:
|
||||
php-version: 7.4
|
||||
coverage: none
|
||||
- name: Install dependencies
|
||||
run: composer i
|
||||
- name: Run coding standards check
|
||||
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
|
||||
|
|
|
@ -92,6 +92,7 @@ CVS/*
|
|||
RCS/*
|
||||
|
||||
/.project
|
||||
.php_cs.cache
|
||||
|
||||
coverage/
|
||||
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
require_once './vendor/autoload.php';
|
||||
|
||||
use Nextcloud\CodingStandard\Config;
|
||||
|
||||
$config = new Config();
|
||||
$config
|
||||
->getFinder()
|
||||
->ignoreVCSIgnored(true)
|
||||
->notPath('build')
|
||||
->notPath('vendor')
|
||||
->in(__DIR__);
|
||||
return $config;
|
|
@ -5,7 +5,8 @@
|
|||
}
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
"php": ">=7.2",
|
||||
"nextcloud/coding-standard": "^0.3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"christophwurst/nextcloud": "v18.0.2",
|
||||
|
@ -13,6 +14,8 @@
|
|||
"phan/phan": "^2.0"
|
||||
},
|
||||
"scripts": {
|
||||
"cs:fix": "php-cs-fixer fix",
|
||||
"cs:check": "php-cs-fixer fix --dry-run",
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;",
|
||||
"phan": "phan --allow-polyfill-parser -k .phan/config.php",
|
||||
"test": "phpunit --configuration phpunit.unit.xml --fail-on-warning"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue