mirror of
https://github.com/nextcloud/richdocuments.git
synced 2025-12-18 05:20:43 +01:00
Add php-cs-fixer
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
cf3ae64e23
commit
95a55cf7b8
5 changed files with 2030 additions and 3 deletions
16
.github/workflows/lint.yml
vendored
16
.github/workflows/lint.yml
vendored
|
|
@ -23,6 +23,22 @@ jobs:
|
|||
- name: Lint
|
||||
run: composer run lint
|
||||
|
||||
php-cs-fixer:
|
||||
name: php-cs check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
- name: Set up php
|
||||
uses: shivammathur/setup-php@2.18.1
|
||||
with:
|
||||
php-version: 7.4
|
||||
coverage: none
|
||||
- name: Install dependencies
|
||||
run: composer i
|
||||
- name: Run coding standards check
|
||||
run: composer run cs:check
|
||||
|
||||
node-linters:
|
||||
runs-on: ubuntu-latest
|
||||
name: ESLint
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -7,3 +7,4 @@ js/
|
|||
richdocuments.zip
|
||||
build/
|
||||
vendor/
|
||||
.php-cs-fixer.cache
|
||||
|
|
|
|||
19
.php-cs-fixer.dist.php
Normal file
19
.php-cs-fixer.dist.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?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('node_modules')
|
||||
->notPath('vendor')
|
||||
->in(__DIR__);
|
||||
return $config;
|
||||
|
|
@ -12,7 +12,9 @@
|
|||
"roave/security-advisories": "dev-master",
|
||||
"christophwurst/nextcloud": "dev-master",
|
||||
"jakub-onderka/php-parallel-lint": "^1.0.0",
|
||||
"psalm/phar": "^4.7"
|
||||
"psalm/phar": "^4.7",
|
||||
"friendsofphp/php-cs-fixer": "^3.8",
|
||||
"nextcloud/coding-standard": "^1.0"
|
||||
},
|
||||
"license": "AGPLv3",
|
||||
"authors": [
|
||||
|
|
@ -24,6 +26,8 @@
|
|||
"scripts": {
|
||||
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
|
||||
"psalm": "psalm.phar",
|
||||
"psalm:fix": "psalm.phar --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType"
|
||||
"psalm:fix": "psalm.phar --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
|
||||
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||
"cs:fix": "php-cs-fixer fix"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1989
composer.lock
generated
1989
composer.lock
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue