https://github.com/cheap-glitch/simplecov-table
📊 A custom SimpleCov formatter to display summaries of coverage reports in table format.
https://github.com/cheap-glitch/simplecov-table
coverage-report simplecov simplecov-formatter
Last synced: over 1 year ago
JSON representation
📊 A custom SimpleCov formatter to display summaries of coverage reports in table format.
- Host: GitHub
- URL: https://github.com/cheap-glitch/simplecov-table
- Owner: cheap-glitch
- License: isc
- Created: 2022-02-15T12:04:35.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-30T14:37:16.000Z (over 4 years ago)
- Last Synced: 2025-02-09T00:18:18.408Z (over 1 year ago)
- Topics: coverage-report, simplecov, simplecov-formatter
- Language: Ruby
- Homepage: https://rubygems.org/gems/simplecov-table
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 📊 simplecov-table
[](LICENSE)
[](https://github.com/cheap-glitch/simplecov-table/releases/latest)
This is a custom [SimpleCov](https://github.com/simplecov-ruby/simplecov)
formatter that displays table-formatted summaries of your coverage reports in
the terminal. It prints the total coverage ratio of each source file, along with
a compressed list of the uncovered lines.
```
────────────────────┬──────────┬──────────────────────────────────────
Files │ Coverage │ Uncovered lines
────────────────────┼──────────┼──────────────────────────────────────
lib/foo.rb │ 78.0% │ 11,12,20-27
lib/foo/bar.rb │ 100.0% │
lib/foo/baz.rb │ 33.5% │ 3,5,63-75,122,128
────────────────────┴──────────┴──────────────────────────────────────
```
## Installation
```
gem install simplecov-table
```
## Usage
```ruby
require 'simplecov'
require 'simplecov-table'
SimpleCov.formatter = SimpleCov::Formatter::TableFormatter
SimpleCov.start
```
Or, if you want to use several formatters:
```ruby
require 'simplecov'
require 'simplecov-table'
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::TableFormatter,
])
SimpleCov.start
```
## Changelog
See the full changelog [here](https://github.com/cheap-glitch/simplecov-table/releases).
## Contributing
Contributions are welcomed! Please open an issue before submitting substantial changes.
## Related
* [`simplecov-erb`](https://github.com/kpaulisse/simplecov-erb) – Flexible plain-text formatter that uses ERB templates
* [`simplecov-lcov`](https://github.com/fortissimo1997/simplecov-lcov) – Simple LCOV formatter
## License
ISC