fix: register go-test-coverage tool in tools/go.mod#14200
fix: register go-test-coverage tool in tools/go.mod#14200Valyrian-Code wants to merge 5 commits into
Conversation
The GO_TEST_COVERAGE Makefile variable invoked 'go tool github.com/vladopajic/go-test-coverage/v2', but the tool was not registered in any module's tool directive, so the go-test-with-coverage and validate-test-coverage targets failed to resolve it. Register the tool in tools/go.mod alongside the other tooling dependencies and point the Makefile invocation at it with -modfile tools/go.mod, matching the existing yamlfmt and goreleaser patterns. Fixes kgateway-dev#12575 Signed-off-by: RAJVEER42 <irajveer.bishnoi2310@gmail.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates the repository’s Go tooling setup to run go-test-coverage via the dedicated tools/go.mod module.
Changes:
- Add
github.com/vladopajic/go-test-coverage/v2to thetoolsmodule toolchain. - Update
tools/go.mod/tools/go.sumwith transitive dependencies required by the new tool. - Adjust the Makefile to invoke
go-test-coverageusing-modfile tools/go.mod.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tools/go.mod | Registers go-test-coverage as a tool and records new indirect dependencies in the tools module. |
| tools/go.sum | Captures module checksums for the newly introduced tool/transitive dependencies. |
| Makefile | Runs go-test-coverage using the tools module via -modfile tools/go.mod. |
|
Thanks for the review. I looked into all three points: 1. 2.
3. Two Net: the only first-party change here is the one-line Makefile invocation plus registering the tool — the additional |
|
Gentle ping on this one. It's a small fix that's been open a few weeks, would appreciate a review whenever a maintainer has time. Thanks! |
|
@Valyrian-Code can you please fix the failing checks. This can be done by running |
Description
The
GO_TEST_COVERAGEMakefile variable referenced the coverage tool viago tool github.com/vladopajic/go-test-coverage/v2, but the tool was notregistered in any module's
tooldirective, somake go-test-with-coverageand
make validate-test-coveragefailed to resolve it.This registers
github.com/vladopajic/go-test-coverage/v2intools/go.mod(alongside the other tooling dependencies) and updates the Makefile invocation
to use
-modfile tools/go.mod, matching the existingyamlfmtandgoreleaserpatterns.
Verified locally:
go tool -modfile tools/go.mod github.com/vladopajic/go-test-coverage/v2 --helpnow resolves and runs the tool.
Fixes #12575
Change Type
/kind fix
Changelog