Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Commit 596f425

Browse files
committed
Parallel file format
1 parent 76b0025 commit 596f425

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

hooks/command

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,26 @@ download_artifacts() {
1919
buildkite-agent artifact download "${BUILDKITE_PLUGIN_CODECLIMATE_TEST_REPORTER_ARTIFACT}" ./
2020
}
2121

22+
format_file() {
23+
printf -- "Formatting file: %s\\n" "$1"
24+
./cc-test-reporter format-coverage ${debug:+"-d"} \
25+
--input-type "${BUILDKITE_PLUGIN_CODECLIMATE_TEST_REPORTER_INPUT_TYPE}" \
26+
--prefix "${BUILDKITE_PLUGIN_CODECLIMATE_TEST_REPORTER_PREFIX}" \
27+
--output "coverage/codeclimate.$2.json" \
28+
"$1"
29+
}
30+
2231
report_coverage() {
2332
printf -- "--- :codeclimate: reporting coverage\\n"
2433

2534
count=1
2635
for f in ${BUILDKITE_PLUGIN_CODECLIMATE_TEST_REPORTER_ARTIFACT}; do
27-
printf -- "Formatting file: %s\\n" "$f"
28-
./cc-test-reporter format-coverage ${debug:+"-d"} \
29-
--input-type "${BUILDKITE_PLUGIN_CODECLIMATE_TEST_REPORTER_INPUT_TYPE}" \
30-
--prefix "${BUILDKITE_PLUGIN_CODECLIMATE_TEST_REPORTER_PREFIX}" \
31-
--output "coverage/codeclimate.$count.json" \
32-
"$f"
36+
format_file "$f" "$count" &
3337
(( count++ ))
3438
done
3539

40+
wait
41+
3642
if [[ -v BUILDKITE_PLUGIN_CODECLIMATE_TEST_REPORTER_PARTS ]] ; then
3743
SUM_PARTS="--parts ${BUILDKITE_PLUGIN_CODECLIMATE_TEST_REPORTER_PARTS}"
3844
else

0 commit comments

Comments
 (0)