Skip to content

🔮 LCOV framework for Shell projects

License

Notifications You must be signed in to change notification settings

javanile/lcov.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LCOV.SH

LCOV framework for Shell projects

.github/workflows/super-linter.yml Build Status codecov Codacy Badge

Requirements

  • BASH 4.* or greater
  • LCOV package (Ubuntu)

Installation

Download lcov.sh file into your local machine

curl -sL https://git.io/lcov.sh

Install lcov package into your system

apt install lcov

Check if it working

bash lcov.sh -v

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...

Suggestion

Use this link to post any soggestion https://lcov.hearken.io/

Testing

Work in progress

Short url

curl -i "https://git.io" \
     -d "url=https://raw.githubusercontent.com/javanile/lcov.sh/master/lcov.sh" \
     -d "code=lcov.sh"

Install lcov package

Debian/Ubuntu

apt install lcov

Mac OSX

brew install lcov

See Also

Changelog

Please see CHANGELOG for more information on what has changed recently.

Testing

make install && make test 

Contributing

Please see CONTRIBUTING for details.

Campaigns

We highly appreciate if you create a social post on facebook or twitter with following hashtag:

Credits

Support us

Javanile is a community project agency based in Sicily, Italy. You'll find an overview of all our projects on our website.

Does your business depend on our contributions? Reach out and support us on Patreon.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.