Skip to content

Commit cf453e5

Browse files
Merge pull request #57566 from nextcloud/ci/noid/speedup-lint
ci(lint): Lint multiple files at once when possible
2 parents e533954 + f5abf92 commit cf453e5

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

3rdparty

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,12 @@
6161
],
6262
"cs:fix": "php-cs-fixer fix",
6363
"cs:check": "php-cs-fixer fix --dry-run --diff",
64-
"lint": "find . -name \\*.php -not -path './lib/composer/*' -not -path './build/stubs/*' -print0 | xargs -0 -n1 php -l",
64+
"lint": [
65+
"@lint-8.2-or-earlier",
66+
"@lint-8.3-or-later"
67+
],
68+
"lint-8.2-or-earlier": "[ $(php -r \"echo PHP_VERSION_ID;\") -ge 80300 ] || find . -type f -name '*.php' -not -path './3rdparty/*' -not -path '*/composer/*' -not -path '*/stubs/*' -not -path '*/vendor-bin/*' -not -path '*/vendor/*' -print0 | xargs -0 -n1 -P$(nproc) php -l",
69+
"lint-8.3-or-later": "[ $(php -r \"echo PHP_VERSION_ID;\") -lt 80300 ] || find . -type f -name '*.php' -not -path './3rdparty/*' -not -path '*/composer/*' -not -path '*/stubs/*' -not -path '*/vendor-bin/*' -not -path '*/vendor/*' -print0 | xargs -0 -n200 -P$(nproc) php -l",
6570
"psalm": "psalm --no-cache --threads=$(nproc)",
6671
"psalm:ocp": "psalm --no-cache --threads=$(nproc) -c psalm-ocp.xml",
6772
"psalm:ncu": "psalm --no-cache --threads=$(nproc) -c psalm-ncu.xml",

0 commit comments

Comments
 (0)