Skip to content

Commit 557f8c0

Browse files
Merge pull request #2259 from nextcloud/ci/noid/speedup-lint
ci(lint): Lint multiple files at once when possible
2 parents c62b6ed + 8bfc959 commit 557f8c0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@
7676
"symfony/polyfill-mbstring": "*"
7777
},
7878
"scripts": {
79-
"lint": "find . -name \\*.php -print0 | xargs -0 -n1 php -l",
79+
"lint": [
80+
"@lint-8.2-or-earlier",
81+
"@lint-8.3-or-later"
82+
],
83+
"lint-8.2-or-earlier": "[ $(php -r \"echo PHP_VERSION_ID;\") -ge 80300 ] || find . -type f -name '*.php' -not -name '.*.php' -print0 | xargs -0 -n1 -P$(nproc) php -l",
84+
"lint-8.3-or-later": "[ $(php -r \"echo PHP_VERSION_ID;\") -lt 80300 ] || find . -type f -name '*.php' -not -name '.*.php' -print0 | xargs -0 -n200 -P$(nproc) php -l",
8085
"pre-autoload-dump": "Aws\\Script\\Composer\\Composer::removeUnusedServices"
8186
},
8287
"extra": {

0 commit comments

Comments
 (0)