README.md in danger-shroud-0.0.4 vs README.md in danger-shroud-0.0.5

- old
+ new

@@ -1,8 +1,8 @@ # danger-shroud -A danger plugin for enforcing code coverage coverage via a Jacoco coverage reports. +A danger plugin for enforcing code coverage coverage via a Kover or Jacoco coverage report. ![Shroud Banner Image](images/bannerImage.png) ## Installation @@ -10,35 +10,64 @@ ```ruby gem 'danger-shroud' ``` -## Usage +## Usage Kover +Shroud depends on having a Kover coverage report generated for your project. For Android projects, [kotlinx-kover](https://github.com/Kotlin/kotlinx-kover) works well. + +Running shroud with default values: + +```ruby +# Report coverage of modified files, fail if either total +# project coverage or any modified file's coverage is under 90% +shroud.reportKover 'Module Name', 'path/to/kover/report.xml' +``` + +Running shroud with custom coverage thresholds: + +```ruby +# Report coverage of modified files, fail if total project coverage is under 80%, +# or if any modified file's coverage is under 95% +shroud.reportKover 'Module Name', 'path/to/kover/report.xml', 80, 95 +``` + +Warn on builds instead of fail: + +```ruby +# Report coverage of modified files the same as the above example, except the +# builds will only warn instead of fail if below thresholds +shroud.reportKover 'Module Name', 'path/to/kover/report.xml', 80, 95, false +``` + + +## Usage Jacoco + Shroud depends on having a Jacoco coverage report generated for your project. For Android projects, [jacoco-android-gradle-plugin](https://github.com/arturdm/jacoco-android-gradle-plugin) works well. Running shroud with default values: ```ruby # Report coverage of modified files, fail if either total # project coverage or any modified file's coverage is under 90% -shroud.report 'path/to/jacoco/report.xml' +shroud.reportJacoco 'Module Name', 'path/to/jacoco/report.xml' ``` Running shroud with custom coverage thresholds: ```ruby # Report coverage of modified files, fail if total project coverage is under 80%, # or if any modified file's coverage is under 95% -shroud.report 'path/to/jacoco/report.xml', 80, 95 +shroud.reportJacoco 'Module Name', 'path/to/jacoco/report.xml', 80, 95 ``` Warn on builds instead of fail: ```ruby # Report coverage of modified files the same as the above example, except the # builds will only warn instead of fail if below thresholds -shroud.report 'path/to/jacoco/report.xml', 80, 95, false +shroud.reportJacoco 'Module Name', 'path/to/jacoco/report.xml', 80, 95, false ``` \ No newline at end of file