Repository navigation
fix: clear the unused findings golangci-lint reports on windows and freebsd - #1537
Merged
Merged
Conversation
Contributor
Binary size
The ceiling is 47000000 bytes for each target. Main's size is from main at 578794b (https://github.com/Gaurav-Gosain/tuios/actions/runs/41816798389). State the size cost in the pull request body. CI fails only above the ceiling. |
masterNameLen and reuseArgs serve only the !windows build, so golangci-lint reported both as unused for GOOS=windows. They move beside their one caller. CI lints linux only, which is why the finding stayed.
RunReaper on unix is its only caller, so golangci-lint reported it as unused for GOOS=windows.
Only the linux and darwin connection checks call myUID, so golangci-lint reported it as unused for GOOS=freebsd. It moves to a file built for those two.
Gaurav-Gosain
force-pushed
the
fix/unused-on-windows-and-freebsd
branch
from
November 4, 2026 10:50
0f7a3dc to
c606b6b
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.
golangci-lint reports four unused declarations outside internal/app and internal/session when it loads the tree for windows or freebsd. CI lints only linux, so they stayed. Each one serves only some platforms, so I moved it into a file built for those platforms. No code changes.
Scope
One commit per package:
masterNameLenandreuseArgsmove fromreuse.gotoreuse_unix.go(!windows), beside their one caller. On windows they were unused.commandEnvmoves fromreaper.gotoreaper_unix.go.RunReaperon unix is its only caller.myUIDmoves fromowner_unix.goto a newopencode_conn_uid.gobuilt for linux and darwin. Only the linux and darwin connection checks read it, and so doesopencode_conn_unix_test.go, which has the same tag. On freebsd it was unused.Verification
golangci-lint runv2.14.0 on the three packages, withGOOSset to linux, windows, darwin and freebsd: 0 issues on each. On main, windows reports the federation and herdrplugin findings and freebsd reportsmyUID.go vetof the three packages for linux, windows, darwin and freebsd passes.just check --changedpasses. Itsfixreport namesherdrplugin/discover.go:126, an older line this branch does not change.go testpasses for federation, herdrplugin and transcriptview.