Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/C5T/ocov
Colors `opa test --coverage` reports in the terminal.
https://github.com/C5T/ocov
Last synced: 25 days ago
JSON representation
Colors `opa test --coverage` reports in the terminal.
- Host: GitHub
- URL: https://github.com/C5T/ocov
- Owner: C5T
- License: mit
- Created: 2022-08-28T09:26:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-06T12:47:50.000Z (over 1 year ago)
- Last Synced: 2024-08-03T21:01:42.410Z (4 months ago)
- Language: C++
- Homepage:
- Size: 15.6 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-opa - ocov - Colors `opa test --coverage` reports in the terminal (Testing / Serverless Blogs and Articles)
README
# `ocov`
The `ocov` tool, short for `OPA Coverage Report`, colors into green and red the covered / not covered lines of the Rego policies, as output by `opa test --coverage`.
## Build
```
git clone --recursive https://github.com/c5t/ocov.git
cd ocov
NDEBUG=1 make .current/ocov
```## Install
Copy `.current/ocov` somewhere into your `$PATH`. The following command does the job on both Mac and Linux.
```
sudo cp .current/ocov /usr/local/bin/
```## Use
Either:
```
opa test ${TEST_ARGS} --coverage | ocov
```Or:
```
opa test ${TEST_ARGS} --coverage > coverage.json
ocov --input coverage.json
```There are also:
```
ocov --version # Or ocov -v
```And:
```
ocov --help
```