Repository navigation
chore(go): remove unreachable functions and enforce deadcode lint - #1275
Merged
Merged
Conversation
kyasbal
requested review from
K53,
RyuSA,
jyane,
kkuchima and
renamoo
as code owners
November 17, 2026 05:38
Contributor
There was a problem hiding this comment.
Code Review
This pull request integrates the Go deadcode analysis tool into the linting pipeline and removes a significant amount of unused and dead code across the repository. The reviewer suggests removing the unused customDependency struct and its associated methods in pkg/core/task/dependency_test.go entirely, rather than adding a tautological unit test to cover it, aligning with the goal of cleaning up dead code.
Go Quality Report (
|
| Metric | Result |
|---|---|
| Changed Scope | 1 prod file(s), 1 test file(s), 1 unit(s) |
| Patch Coverage | 100.0% (0/0 lines) |
| Mutation Score | 100.0% (0/0 killed, 0 survived) |
Commit: 85b9623ea5b7 · Cloud Build Logs
kyasbal
force-pushed
the
push-tkktluqnxxto
branch
from
November 18, 2026 01:40
9ed3865 to
85b9623
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduce whole-program reachability analysis for Go using
golang.org/x/tools/cmd/deadcode(managed via thego.modtooldirective) and remove existing unreachable functions, methods, and orphaned helper files across production and test packages.Standard per-package linters such as
golangci-lint'sunusedrule treat exported symbols and interface-satisfying methods as potentially reachable from external callers. Runninggo tool deadcode -test ./cmd/... ./pkg/... ./scripts/...performs call-graph reachability from entrypoints and test suites across the monorepo, catching dead functions and unused test utilities. The check is wired intomake lint-deadcode,make lint-go, and thebackend-testsGitHub Actions workflow.