fix: golangci-lint findings, second delivery#2163
Closed
christiangda wants to merge 8 commits intoblevesearch:masterfrom
Closed
fix: golangci-lint findings, second delivery#2163christiangda wants to merge 8 commits intoblevesearch:masterfrom
christiangda wants to merge 8 commits intoblevesearch:masterfrom
Conversation
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.
Since I started using this project on my production workloads, I would like to contribute to the project.
This second delivery still fixing easy stuff like:
golangci-lint run --go 1.21 ./... | grep "SA1012:"-> SA1012: do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (staticcheck)golangci-lint run --go 1.21 ./... | grep "S1039:"-> S1039: unnecessary use of fmt.Sprintf (gosimple)golangci-lint run --go 1.21 ./... | grep "S1011:"-> S1011: should replace loop withq.Conjuncts = append(q.Conjuncts, aq...)(gosimple)golangci-lint run --go 1.21 ./... | grep "ineffectual assignment to err"golangci-lint run --go 1.21 ./... | grep "S1005:"-> S1005: unnecessary assignment to the blank identifier (gosimple)golangci-lint run --go 1.21 ./... | grep "S1021:"-> S1021: should merge variable declaration with assignment on next line (gosimple)golangci-lint run --go 1.21 ./... | grep "Error return value of"I hope this contribution starts helping and standardizing the code according to the golang version used.