16
.github/workflows/lint.yml
vendored
16
.github/workflows/lint.yml
vendored
@@ -26,6 +26,22 @@ jobs:
|
|||||||
- name: Lint
|
- name: Lint
|
||||||
run: composer run lint
|
run: composer run lint
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
node:
|
node:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -7,5 +7,5 @@ tests/integration/vendor/
|
|||||||
tests/integration/composer.lock
|
tests/integration/composer.lock
|
||||||
vendor/
|
vendor/
|
||||||
*.lock
|
*.lock
|
||||||
|
.php_cs.cache
|
||||||
\.idea/
|
\.idea/
|
||||||
|
|||||||
18
.php_cs.dist
Normal file
18
.php_cs.dist
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
require_once './vendor/autoload.php';
|
||||||
|
|
||||||
|
use Nextcloud\CodingStandard\Config;
|
||||||
|
|
||||||
|
$config = new Config();
|
||||||
|
$config
|
||||||
|
->getFinder()
|
||||||
|
// ->ignoreVCSIgnored(true)
|
||||||
|
->notPath('build')
|
||||||
|
->notPath('l10n')
|
||||||
|
->notPath('src')
|
||||||
|
->notPath('vendor')
|
||||||
|
->in(__DIR__);
|
||||||
|
return $config;
|
||||||
@@ -15,13 +15,16 @@
|
|||||||
"roave/security-advisories": "dev-master",
|
"roave/security-advisories": "dev-master",
|
||||||
"christophwurst/nextcloud": "^17",
|
"christophwurst/nextcloud": "^17",
|
||||||
"jakub-onderka/php-parallel-lint": "^1.0.0",
|
"jakub-onderka/php-parallel-lint": "^1.0.0",
|
||||||
"phpunit/phpunit": "^8"
|
"phpunit/phpunit": "^8",
|
||||||
|
"nextcloud/coding-standard": "^0.3.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
"classmap-authoritative": true
|
"classmap-authoritative": true
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
|
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;",
|
||||||
|
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||||
|
"cs:fix": "php-cs-fixer fix"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user