https://github.com/f3ath/check-coverage
A tiny Dart CLI tool to check if code coverage is below the threshold.
https://github.com/f3ath/check-coverage
Last synced: 9 months ago
JSON representation
A tiny Dart CLI tool to check if code coverage is below the threshold.
- Host: GitHub
- URL: https://github.com/f3ath/check-coverage
- Owner: f3ath
- License: mit
- Created: 2021-03-09T23:30:24.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-24T19:16:55.000Z (about 1 year ago)
- Last Synced: 2025-04-17T10:26:26.675Z (9 months ago)
- Language: Dart
- Size: 20.5 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# check-coverage
A tiny Dart CLI tool to check if code coverage is below the threshold.
Pass the content of the trace file (lcov) as the input. Provide the desired coverage as the argument.
Example usage in a Dart project:
```
dart test --coverage=.coverage
format_coverage -l -c -i .coverage --report-on=lib | check_coverage 98
```
The first line runs the tests placing the coverage report in the `.coverage` folder.
The second line produces a combined lcov coverage and passes it to the tool requiring at least 98% coverage.
The tool will exit normally if the coverage is at or above the threshold.
Otherwise, it will set the exit status to 1 and list the least covered files.