Repository navigation
chore: fix staticcheck findings and enforce go fix in lint - #21
Merged
Merged
Conversation
SIGKILL cannot be handled, so listing it in signal.Notify had no effect. Behavior is unchanged.
The callback overwrote err before reading it. Behavior is unchanged.
A plain string key can collide with keys from other packages. The header name and the stored value are unchanged.
Replaces interface{} with any, a counting loop with range over int, and fmt.Sprintf into []byte with fmt.Appendf. Produced by just format.
go fix -diff exits 0 even when it prints a diff, so lint never failed on it.
The other ignored checks are fixed in code. SA1019 stays because the aws-sdk-go v1 migration is a larger change.
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.
What and why
Removes the left-over ignores from
staticcheck.confthat #20 added so lint would pass, and fixes the findings in code. Behavior is unchanged.os.Killremoved fromsignal.Notify; SIGKILL cannot be caught.errparameter in the migrationWalkDircallback is now_.Host.conffield andfmtMultihash.go fixchanges (any,range,fmt.Appendf) applied withjust format, in their own commit.just lintnow fails whengo fix -diffprints changes. Before, it exited 0 either way.SA1019 stays ignored in
staticcheck.conf, with a comment. It covers deprecated aws-sdk-go v1 (pkg/firehose) and go-ipfs-util (pkg/util). The move to aws-sdk-go v2 is too large for this PR.How I checked it
just cipasses (gofumpt, go fix, go vet, staticcheck 2026.2.2, build, test).just lintexits 1 when ago fixchange is pending.pkg/server,pkg/db,cmd/parsec). Only the build and static checks cover them.Deploy
Nothing.