Skip to content

Commit 76759a0

Browse files
committed
fix: linter
1 parent 2a49418 commit 76759a0

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

src/runner.sh

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -354,21 +354,28 @@ function runner::parse_result_sync() {
354354
local result_line
355355
result_line=$(echo "$execution_result" | tail -n 1)
356356

357-
local regex='ASSERTIONS_FAILED=([0-9]*)##ASSERTIONS_PASSED=([0-9]*)##ASSERTIONS_SKIPPED=([0-9]*)##ASSERTIONS_INCOMPLETE=([0-9]*)##ASSERTIONS_SNAPSHOT=([0-9]*)##TEST_EXIT_CODE=([0-9]*)'
357+
local assertions_failed=0
358+
local assertions_passed=0
359+
local assertions_skipped=0
360+
local assertions_incomplete=0
361+
local assertions_snapshot=0
362+
local test_exit_code=0
363+
364+
local regex
365+
regex='ASSERTIONS_FAILED=([0-9]*)##'
366+
regex+='ASSERTIONS_PASSED=([0-9]*)##'
367+
regex+='ASSERTIONS_SKIPPED=([0-9]*)##'
368+
regex+='ASSERTIONS_INCOMPLETE=([0-9]*)##'
369+
regex+='ASSERTIONS_SNAPSHOT=([0-9]*)##'
370+
regex+='TEST_EXIT_CODE=([0-9]*)'
371+
358372
if [[ $result_line =~ $regex ]]; then
359-
local assertions_failed="${BASH_REMATCH[1]}"
360-
local assertions_passed="${BASH_REMATCH[2]}"
361-
local assertions_skipped="${BASH_REMATCH[3]}"
362-
local assertions_incomplete="${BASH_REMATCH[4]}"
363-
local assertions_snapshot="${BASH_REMATCH[5]}"
364-
local test_exit_code="${BASH_REMATCH[6]}"
365-
else
366-
local assertions_failed=0
367-
local assertions_passed=0
368-
local assertions_skipped=0
369-
local assertions_incomplete=0
370-
local assertions_snapshot=0
371-
local test_exit_code=0
373+
assertions_failed="${BASH_REMATCH[1]}"
374+
assertions_passed="${BASH_REMATCH[2]}"
375+
assertions_skipped="${BASH_REMATCH[3]}"
376+
assertions_incomplete="${BASH_REMATCH[4]}"
377+
assertions_snapshot="${BASH_REMATCH[5]}"
378+
test_exit_code="${BASH_REMATCH[6]}"
372379
fi
373380

374381
log "debug" "[SYNC]" "fn_name:$fn_name" "execution_result:$execution_result"

0 commit comments

Comments
 (0)