🎉 Happy News! The new release is out :-) Get it NOW!

lcov.sh

cli

Coverage framework for Shell projects

Usage

Add the following code [[ -z "${LCOV_DEBUG}" ]] || set -x on top of source file you want in a coverage report, see below example:

#!/bin/bash
[[ -z "${LCOV_DEBUG}" ]] || set -x

welcome () {
    echo "Hi $1, I'm testable code"
}

welcome "John"

Now, run from command line the following command:

lcov.sh FILE...