Skip to content
| Marketplace
Sign in
Visual Studio Code>Debuggers>GoverageNew to Visual Studio Code? Get it now.
Goverage

Goverage

pixel365

|
12 installs
| (0) | Free
Goverage is a plugin for VS Code that shows inline test coverage percentages for each function, powered by go tool cover.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Goverage – Inline Go Code Coverage Hints for VS Code

Goverage is a VS Code extension that displays inline code coverage hints for Go files, based on the go test -coverprofile report.
It helps visualize how well your Go functions and files are covered by tests.


✨ Features

  • ✅ File-level coverage: shown above the package line.
  • ✅ Function-level coverage: shown above each func declaration.
  • ✅ Parses coverage.out generated by go test -coverpkg=./... -coverprofile=coverage.out.
  • ✅ Updates automatically when coverage.out is saved or opened.
  • ✅ Supports both unit and integration tests.

📦 Installation

✅ From VS Code Marketplace

👉 Install from Visual Studio Marketplace

  1. Open VS Code.
  2. Go to Extensions (Ctrl+Shift+X) and search for Goverage.
  3. Click Install.

🛠 Manual Installation

  1. Clone this repository and build the extension:

    npm install
    npm run compile
    
  2. Package it:

    vsce package
    
  3. Install the .vsix file in VS Code:

    code --install-extension goverage-vscode-0.1.0.vsix
    

🚀 Usage

  1. Generate the coverage report:

    go test -coverpkg=./... -coverprofile=coverage.out
    
  2. Open any .go file in your project.

  3. You’ll see inline hints like:

    File Coverage: 91.75%
    Function Coverage: 85.00%
    

🛠️ Notes

  • Coverage uses Go’s coverprofile format.
  • Calculations are based on statements covered, not lines.
  • The extension reads the go.mod file to resolve the module name for path matching.
  • Monorepo support assumes coverage.out and go test are run per-module.
  • Integration tests may not mark functions as covered unless directly invoked.

📄 License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft