Skip to content

Commit

Permalink
Add shared php-cs config
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <[email protected]>
  • Loading branch information
ChristophWurst committed Mar 31, 2020
1 parent 5a0856c commit 3eac89d
Show file tree
Hide file tree
Showing 5 changed files with 1,744 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ CVS/*
.svn/*
RCS/*
*.backup*
.php_cs.cache

# kdevelop
.kdev
Expand Down
19 changes: 19 additions & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
@@ -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 changes: 2 additions & 0 deletions build/files-checker.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
'.idea',
'.jshintrc',
'.mailmap',
'.php_cs.dist',
'.scrutinizer.yml',
'.tag',
'.tx',
Expand All @@ -51,6 +52,7 @@
'CHANGELOG.md',
'CODE_OF_CONDUCT.md',
'composer.json',
'composer.lock',
'config',
'console.php',
'contribute',
Expand Down
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 \"{}\" \\;"
}
}
Loading

0 comments on commit 3eac89d

Please sign in to comment.