Browse Source

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

Add a shared php coding style fixer config
tags/v19.0.0beta1
Roeland Jago Douma 4 years ago
parent
commit
32577f2f57
No account linked to committer's email address
5 changed files with 1744 additions and 4 deletions
  1. 1
    0
      .gitignore
  2. 19
    0
      .php_cs.dist
  3. 2
    0
      build/files-checker.php
  4. 7
    4
      composer.json
  5. 1715
    0
      composer.lock

+ 1
- 0
.gitignore View File

.svn/* .svn/*
RCS/* RCS/*
*.backup* *.backup*
.php_cs.cache


# kdevelop # kdevelop
.kdev .kdev

+ 19
- 0
.php_cs.dist View File

<?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
- 0
build/files-checker.php View File

'.idea', '.idea',
'.jshintrc', '.jshintrc',
'.mailmap', '.mailmap',
'.php_cs.dist',
'.scrutinizer.yml', '.scrutinizer.yml',
'.tag', '.tag',
'.tx', '.tx',
'CHANGELOG.md', 'CHANGELOG.md',
'CODE_OF_CONDUCT.md', 'CODE_OF_CONDUCT.md',
'composer.json', 'composer.json',
'composer.lock',
'config', 'config',
'console.php', 'console.php',
'contribute', 'contribute',

+ 7
- 4
composer.json View File

}, },
"require-dev": { "require-dev": {
"jakub-onderka/php-parallel-lint": "^0.9.2", "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
- 0
composer.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save