Skip to content
프로젝트

소개

터미널에서 Go 커버리지 확인: 명령줄에서 Go 커버리지 보고서를 탐색하는 도구 💻

개발 도구

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
+2
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Gocovsh - Go Coverage in your terminal

gocovsh is a tool for exploring Go Coverage reports from the command line.

Don't skip the Giving back section! 💰

Demo below 🎬 👇

There is a Russian word Ковш (pronounced like "Kovsh") which means a ladle or a dipper. "The Big Dipper" is also a part of the constellation Ursa Major, thus the friendly dipper-shaped Gopher mascot, created by Michael Zolotov.

Test Go Report Card codecov go-recipes

Installation

Using Homebrew

brew install orlangure/tap/gocovsh

Pre-built binary

Grab your pre-built binary from the Releases page.

From source

# install latest, probably unreleased version
go install github.com/orlangure/gocovsh@latest

# or install a specific version
go install github.com/orlangure/[email protected]

Usage

  1. Generate Go coverage report at your project's root with

    go test -cover -coverprofile coverage.out
    

    For more information about generating Go coverage reports, see 📝 my blog post.

  2. Run gocovsh at the same folder with coverage.out report and go.mod file (go.mod is required).

    gocovsh                        # show all files from coverage report
    git diff --name-only | gocovsh # only show changed files
    git diff | gocovsh             # show coverage on top of current diff
    gocovsh --profile profile.out  # for other coverage profile names
    
  3. Use j/k/enter/esc keys to explore the report. See built-in help for more key-bindings.

Themes

gocovsh supports 4 nice themes (using Catppuccin Theme project) and an ugly default one at this moment. To change the theme, set GOCOVSH_THEME environment variable to one of the following values: mocha, latte, frappe or macchiato:

GOCOVSH_THEME=mocha gocovsh
GOCOVSH_THEME=latte gocovsh
GOCOVSH_THEME=frappe gocovsh
GOCOVSH_THEME=macchiato gocovsh

To always use the same theme, add export GOCOVSH_THEME=<theme name> to your ~/.bashrc, ~/.zshrc or any other file that you use for shell configuration.

Giving back

This is a free and open source project that hopefully helps its users, at least a little. Even though I don't need donations to support it, I understand that there are people that wish to give back anyway. If you are one of them, I encourage you to plant some trees with Tree Nation 🌲 🌳 🌴

If you want me to know about your contribution, make sure to use [email protected] as the recipient email.

Thank you!

Demo

Viewing Go code coverage reports

go code coverage report viewer in the command line

Only show Go code coverage of changed files

go code coverage report of changed files in the command line

Go code coverage on top of git diff

go code coverage report on top of git diff in the command line

관련 프로젝트 살펴보기

불러오는 중…