Skip to content
Discussion options

You must be logged in to vote

Unfortunately this is a kcov issue. You can measure coverage directly in kcov in the following way, but you will get the same results.

$ kcov ./cov ./test.sh

In the future I would like to eliminate the kcov dependency and replace it with own coverage tool shellcov, but this will not be done right away.

FYI: Coverage is generated from the following data internally. To fix this issue correctly, shell script parsing would be required.

$ cat -n test.sh
     1	#!/bin/bash
     2
     3	foo() {
     4	  var1="$1"
     5	  var2="$2"
     6	  date='{
     7	    "key": "value"
     8	  }'
     9	}
    10
    11	foo 1 2

$ PS4='$LINENO ' bash -x test.sh
11 foo 1 2
4 var1=1
5 var2=2
8 date='{
    "k…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aareman
Comment options

Answer selected by aareman
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants