Browse Source

Merge pull request #20209 from nextcloud/techdebt/php-cs-config

Add a shared php coding style fixer config
pull/20215/head
Roeland Jago Douma 6 years ago
committed by GitHub
parent
commit
32577f2f57
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .gitignore
  2. 19
      .php_cs.dist
  3. 2
      build/files-checker.php
  4. 11
      composer.json
  5. 1715
      composer.lock

1
.gitignore

@ -70,6 +70,7 @@ CVS/*
.svn/*
RCS/*
*.backup*
.php_cs.cache
# kdevelop
.kdev

19
.php_cs.dist

@ -0,0 +1,19 @@
<?php
declare(strict_types=1);
require_once './lib/composer/autoload.php';
use Nextcloud\CodingStandard\Config;
$config = new Config();
$config
->getFinder()
->ignoreVCSIgnored(true)
->exclude('config')
->exclude('data')
->notPath('3rdparty')
->notPath('composer')
->notPath('vendor')
->in(__DIR__);
return $config;

2
build/files-checker.php

@ -35,6 +35,7 @@ $expectedFiles = [
'.idea',
'.jshintrc',
'.mailmap',
'.php_cs.dist',
'.scrutinizer.yml',
'.tag',
'.tx',
@ -51,6 +52,7 @@ $expectedFiles = [
'CHANGELOG.md',
'CODE_OF_CONDUCT.md',
'composer.json',
'composer.lock',
'config',
'console.php',
'contribute',

11
composer.json

@ -15,9 +15,12 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "^0.9.2",
"jakub-onderka/php-console-highlighter": "^0.3.2"
"jakub-onderka/php-console-highlighter": "^0.3.2",
"nextcloud/coding-standard": "^0.1.0"
},
"scripts": {
"lint": "find . -name \\*.php -not -path './lib/composer/*' -exec php -l \"{}\" \\;"
}
"scripts": {
"cs:fix": "php-cs-fixer fix",
"cs:check": "php-cs-fixer fix --dry-run",
"lint": "find . -name \\*.php -not -path './lib/composer/*' -exec php -l \"{}\" \\;"
}
}

1715
composer.lock
File diff suppressed because it is too large
View File

Loading…
Cancel
Save