Install Tobari
This skill helps install the tobari CLI tool for scoped coverage measurement in Go.
Installation
Install the tobari CLI using the following command:
go install github.com/goccy/tobari/cmd/tobari@latest
Verify Installation
After installation, verify that tobari is available:
tobari version
Important Version Matching
The version of the tobari CLI tool and the tobari library used in your application must match.
For example, if you install tobari@v0.2.1, your go.mod should also require:
github.com/goccy/tobari v0.2.1
Version mismatch will cause fingerprint errors during linking.
Basic Usage
After installation, you can run tests with tobari coverage:
GOFLAGS="$(tobari flags)" go test ./...
This will generate coverage data in tobari/tobari.json and tobari/tobari.toon.
Specifying Output Directory
Use TOBARI_COVERDIR to specify where coverage data should be written:
TOBARI_COVERDIR=/path/to/output GOFLAGS="$(tobari flags)" go test ./...
Next Steps
After running tests with tobari:
- •Use
tobari-duplicated-tests-removerskill to find and remove duplicate tests - •Use
tobari-coverage-improverskill to improve test coverage incrementally