Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/essentialkaos/htmlcov

Utility for converting Go coverage profiles into HTML pages
https://github.com/essentialkaos/htmlcov

coverage golang

Last synced: about 1 month ago
JSON representation

Utility for converting Go coverage profiles into HTML pages

Awesome Lists containing this project

README

        


GoReportCard
Codacy badge
GitHub Actions CI Status
GitHub Actions CodeQL Status

InstallationCommand-line completionMan documentationUsageCI StatusContributingLicense


`htmlcov` is an utility for converting Go coverage profiles into HTML pages. It's just better version of `go tool cover -html=cover.out -o coverage.html` command.

![Screenshot](.github/images/screenshot1.png)

![Screenshot](.github/images/screenshot2.png)

### Installation

#### From source

To build the `htmlcov` from scratch, make sure you have a working [Go 1.22+](https://github.com/essentialkaos/.github/blob/master/GO-VERSION-SUPPORT.md) workspace (_[instructions](https://go.dev/doc/install)_), then:

```
go install github.com/essentialkaos/htmlcov@latest
```

#### Prebuilt binaries

You can download prebuilt binaries for Linux and macOS from [EK Apps Repository](https://apps.kaos.st/htmlcov/latest):

```bash
bash <(curl -fsSL https://apps.kaos.st/get) htmlcov
```

### Command-line completion

You can generate completion for `bash`, `zsh` or `fish` shell.

Bash:
```bash
sudo htmlcov --completion=bash 1> /etc/bash_completion.d/htmlcov
```

ZSH:
```bash
sudo htmlcov --completion=zsh 1> /usr/share/zsh/site-functions/htmlcov
```

Fish:
```bash
sudo htmlcov --completion=fish 1> /usr/share/fish/vendor_completions.d/htmlcov.fish
```

### Man documentation

You can generate man page using next command:

```bash
htmlcov --generate-man | sudo gzip > /usr/share/man/man1/htmlcov.1.gz
```

### Usage

### CI Status

| Branch | Status |
|--------|----------|
| `master` | [![CI](https://kaos.sh/w/htmlcov/ci.svg?branch=master)](https://kaos.sh/w/htmlcov/ci?query=branch:master) |
| `develop` | [![CI](https://kaos.sh/w/htmlcov/ci.svg?branch=develop)](https://kaos.sh/w/htmlcov/ci?query=branch:develop) |

### Contributing

Before contributing to this project please read our [Contributing Guidelines](https://github.com/essentialkaos/contributing-guidelines#contributing-guidelines).

### License

[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)