Sha256: 78daa4b0bc58a8b37bfe8a4542ce9f9b539c186bc1933bdf7fd319c91efc23e0

Contents?: true

Size: 1.51 KB

Versions: 5

Compression:

Stored size: 1.51 KB

Contents

# danger-kover

A danger plugin for enforcing code coverage coverage based on a Kover coverage report.

![Sample Banner Image](images/bannerImage.png)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'danger-kover'
```

## Danger Kover Plugin Usage 

It 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 with default values:

```ruby
# Report coverage of modified files. 
# Fail if either total project coverage or any modified file's coverage is under 70%.
kover.report 'Module Name', 'path/to/kover/report.xml'
```

Running with custom attributes:

- Fail if total project coverage is under 70%.
- Or if any modified file's coverage is under 80%.

```ruby
kover.total_threshold = 70
kover.file_threshold = 80
kover.report 'Module Name', 'path/to/kover/report.xml'
```

Optional attribute to only warn instead of failing if below thresholds:

```ruby
kover.fail_if_under_threshold = false
```

## Credits

This is a fork, based on [Shroud](https://github.com/livefront/danger-shroud).

## Development

1. Clone this repo
2. Run `bundle install` to setup dependencies.
3. Run `bundle exec rake spec` to run the tests.
4. Use `bundle exec guard` to automatically have tests run as you make changes.
5. Make your changes.

## Publishing

How to build a gem (make sure to update the version):

```
gem build danger-kover.gemspec
```

How to publish a gem:

```
gem push danger-kover-VERSION.gem
```

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
danger-kover-0.0.7 README.md
danger-kover-0.0.6 README.md
danger-kover-0.0.5 README.md
danger-kover-0.0.4 README.md
danger-kover-0.0.3 README.md