Skip to content

chore(go): remove unreachable functions and enforce deadcode lint - #1275

Merged
kyasbal merged 2 commits into
push-qvnlqzwootnzfrom
push-tkktluqnxxto
Nov 18, 2026
Merged

kyasbal merged 2 commits into
push-qvnlqzwootnzfrom
push-tkktluqnxxto

Conversation

@kyasbal

@kyasbal kyasbal commented Nov 17, 2026

Copy link
Copy Markdown
Member

Stacked on #1274

Summary

Introduce whole-program reachability analysis for Go using golang.org/x/tools/cmd/deadcode (managed via the go.mod tool directive) and remove existing unreachable functions, methods, and orphaned helper files across production and test packages.

Standard per-package linters such as golangci-lint's unused rule treat exported symbols and interface-satisfying methods as potentially reachable from external callers. Running go 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 into make lint-deadcode, make lint-go, and the backend-tests GitHub Actions workflow.

@kyasbal kyasbal added area:backend-core Core backend frameworks, DAG task runner, and server API area:backend-parser Log parsers and log timeline mapper tasks area:cicd GitHub Actions workflows and release pipelines area:devenv Development environment, Makefile, and build tooling type:chore Maintenance, dependency updates, and tooling chores labels Nov 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread pkg/core/task/dependency_test.go Resolved
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Go Quality Report (origin/push-qvnlqzwootnz) — ✅ PASS

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
kyasbal added this pull request to stack #1280 November 17, 2026 05:59
@kyasbal
kyasbal added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 53545de Nov 18, 2026
37 checks passed
@kyasbal
kyasbal deleted the push-tkktluqnxxto branch November 18, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend-core Core backend frameworks, DAG task runner, and server API area:backend-parser Log parsers and log timeline mapper tasks area:cicd GitHub Actions workflows and release pipelines area:devenv Development environment, Makefile, and build tooling type:chore Maintenance, dependency updates, and tooling chores

1 participant