]> git.mdlowis.com Git - proto/labwc.git/commitdiff
CI: increase speed of codestyle check
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 3 Aug 2024 03:30:02 +0000 (05:30 +0200)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 4 Aug 2024 19:01:50 +0000 (21:01 +0200)
by running up to nproc ones in parallel

scripts/check

index 7b8c6255ab827a2a53651e41c1095f2c15bcdc7f..9e10866617c9afb3269408896cb001d58435d472 100755 (executable)
@@ -19,14 +19,10 @@ run_checks () {
                return $?
        fi
 
-       find src/ include/ \( -name "*.c" -o -name "*.h" \) -type f |
-       {
-               errors=0
-               while IFS= read -r file; do
-                       run_checkpatch "$file" || errors=1
-               done
-               return ${errors}
-       }
+       find src/ include/ \( -name "*.c" -o -name "*.h" \) -type f -print0 |
+       nice xargs -0 --max-args 1 --max-procs $(nproc) \
+               scripts/checkpatch.pl --terse --no-tree --strict --file
+       return $?
 }
 
 main () {