Skip to content

chore(go): enable unparam linter and remove dead struct fields - #1276

Merged
kyasbal merged 2 commits into
push-tkktluqnxxtofrom
push-wlwkzqlxxppv
Nov 18, 2026
Merged

kyasbal merged 2 commits into
push-tkktluqnxxtofrom
push-wlwkzqlxxppv

Conversation

@kyasbal

@kyasbal kyasbal commented Nov 17, 2026

Copy link
Copy Markdown
Member

Stacked on #1275

Summary

Enable the unparam linter in .golangci.yaml for production Go code and clean up unused function parameters, constant return values, and write-only or unread struct fields across backend packages.

Excluding _test.go files from unparam avoids false positives on test stubs and interface mock implementations that intentionally return constant nil errors, while keeping production helper signatures free of dead parameters and redundant error returns.

@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:devenv Development environment, Makefile, and build tooling area:khifile .khi file format, serialization, and schema 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 enables the unparam linter in .golangci.yaml and performs a comprehensive cleanup across the codebase to resolve violations. The changes primarily involve removing unused function parameters (such as ctx in various mapper and utility functions), unused struct fields, unused helper structs (like countingReader), and unnecessary error return values that were consistently nil. All corresponding call sites and unit tests have been updated to match the refactored signatures. There are no review comments provided, and the changes look clean and correct, so I have no additional feedback.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

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

Metric Result
Changed Scope 24 prod file(s), 13 test file(s), 64 unit(s)
Patch Coverage 78.9% (45/57 lines)
Mutation Score 100.0% (5/5 killed, 0 survived)

Commit: 4ead40c45331 · Cloud Build Logs

@kyasbal
kyasbal added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit bbcd7b1 Nov 18, 2026
37 checks passed
@kyasbal
kyasbal deleted the push-wlwkzqlxxppv 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:devenv Development environment, Makefile, and build tooling area:khifile .khi file format, serialization, and schema type:chore Maintenance, dependency updates, and tooling chores

1 participant