зеркало из https://github.com/nextcloud/spreed.git
Add PHP CS
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
43ed8be95a
Коммит
877166cf79
|
@ -28,6 +28,29 @@ jobs:
|
|||
- name: Lint
|
||||
run: "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
|
||||
|
||||
php-cs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-versions: ['7.4']
|
||||
|
||||
name: php${{ matrix.php-versions }} CS
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up php ${{ matrix.php-versions }}
|
||||
uses: shivammathur/setup-php@v1
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
coverage: none
|
||||
|
||||
- name: Composer
|
||||
run: composer install
|
||||
|
||||
- name: Check CS
|
||||
run: composer run cs:check
|
||||
|
||||
node:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
|
|
@ -14,3 +14,7 @@ tests/integration/vendor
|
|||
tests/integration/output
|
||||
|
||||
js
|
||||
|
||||
# PHP Coding Style
|
||||
vendor/
|
||||
.php_cs.cache
|
||||
|
|
|
@ -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;
|
4
Makefile
4
Makefile
|
@ -61,6 +61,8 @@ appstore:
|
|||
--exclude=babel.config.js \
|
||||
--exclude=/build \
|
||||
--exclude=check-vuejs-builds.sh \
|
||||
--exclude=composer.json \
|
||||
--exclude=composer.lock \
|
||||
--exclude=docs \
|
||||
--exclude=.drone.yml \
|
||||
--exclude=.eslintignore \
|
||||
|
@ -76,12 +78,14 @@ appstore:
|
|||
--exclude=node_modules \
|
||||
--exclude=package.json \
|
||||
--exclude=package-lock.json \
|
||||
--exclude=.php_cs.dist \
|
||||
--exclude=README.md \
|
||||
--exclude=run-*lint.sh \
|
||||
--exclude=src \
|
||||
--exclude=.stylelintignore \
|
||||
--exclude=.stylelintrc \
|
||||
--exclude=tests \
|
||||
--exclude=vendor \
|
||||
--exclude=webpack.*.js \
|
||||
$(project_dir)/ $(sign_dir)/$(app_name)
|
||||
@if [ -f $(cert_dir)/$(app_name).key ]; then \
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"scripts": {
|
||||
"cs:check": "php-cs-fixer fix --dry-run --diff",
|
||||
"cs:fix": "php-cs-fixer fix"
|
||||
},
|
||||
"require-dev": {
|
||||
"nextcloud/coding-standard": "^0.3.0"
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче