Sonar Coverage Watchdog
Parse lcov report and compare coverage value with sonar measures. Exit 1 if coverage drops.
Requirements
- node >= 6
- sonarcube ~= 5.6.1 (Not tested with other versions, API may be different)
Installation
npm install sonarcov-watchdog --save
Or add it to your package.json
Usage
$ sonarcov-watchdog --help Usage: sonarcov-watchdog [options] [sonar-url [sonar-api-token]] Parse lcov report and compare coverage value with sonar measures. Exit 1
Exemple
$ sonarcov-watchdog https://my.sonar.instance.site.com mysecrettokenCurrent coverage is +0% from masterValue is stable, fair enough.$ echo $?0
$ sonarcov-watchdog https://my.sonar.instance.site.com mysecrettokenCurrent coverage is -3.3% from masterValue has decreased, try again !$ echo $?1