Skip to content
Snippets Groups Projects
Unverified Commit 32577f2f authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

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

Add a shared php coding style fixer config
parents 61aa4d9a 3eac89d4
No related branches found
No related tags found
No related merge requests found
...@@ -70,6 +70,7 @@ CVS/* ...@@ -70,6 +70,7 @@ CVS/*
.svn/* .svn/*
RCS/* RCS/*
*.backup* *.backup*
.php_cs.cache
# kdevelop # kdevelop
.kdev .kdev
......
<?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;
...@@ -35,6 +35,7 @@ $expectedFiles = [ ...@@ -35,6 +35,7 @@ $expectedFiles = [
'.idea', '.idea',
'.jshintrc', '.jshintrc',
'.mailmap', '.mailmap',
'.php_cs.dist',
'.scrutinizer.yml', '.scrutinizer.yml',
'.tag', '.tag',
'.tx', '.tx',
...@@ -51,6 +52,7 @@ $expectedFiles = [ ...@@ -51,6 +52,7 @@ $expectedFiles = [
'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',
......
...@@ -15,9 +15,12 @@ ...@@ -15,9 +15,12 @@
}, },
"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": { "scripts": {
"lint": "find . -name \\*.php -not -path './lib/composer/*' -exec php -l \"{}\" \\;" "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 \"{}\" \\;"
}
} }
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment