Skip to content

fix: golangci-lint findings, second delivery#2163

Closed
christiangda wants to merge 8 commits intoblevesearch:masterfrom
christiangda:fix-golangci-lint
Closed

fix: golangci-lint findings, second delivery#2163
christiangda wants to merge 8 commits intoblevesearch:masterfrom
christiangda:fix-golangci-lint

Conversation

@christiangda
Copy link
Contributor

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 with q.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant