-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
investigate and fix staticcheck
issues
#3519
Labels
Comments
dmitris
added a commit
to dmitris/prebid-server
that referenced
this issue
Apr 10, 2024
The issues flagged by golangci-lint: https://gist.github.com/dmitris/b2b6836f2e90efa2131a74d8c5253ab7 Related to issue prebid#3519.
dmitris
added a commit
to dmitris/prebid-server
that referenced
this issue
Apr 17, 2024
The issues flagged by golangci-lint: https://gist.github.com/dmitris/b2b6836f2e90efa2131a74d8c5253ab7 Related to issue prebid#3519.
dmitris
added a commit
to dmitris/prebid-server
that referenced
this issue
Apr 22, 2024
The issues flagged by golangci-lint: https://gist.github.com/dmitris/b2b6836f2e90efa2131a74d8c5253ab7 Related to issue prebid#3519.
dmitris
added a commit
to dmitris/prebid-server
that referenced
this issue
Apr 25, 2024
The issues flagged by golangci-lint: https://gist.github.com/dmitris/b2b6836f2e90efa2131a74d8c5253ab7 Related to issue prebid#3519.
current output (commit 4dc4005): $ golangci-lint run --disable-all -E staticcheck ./... |& tee /tmp/out
stored_requests/events/http/http.go:83:15: SA1015: using time.Tick leaks the underlying ticker, consider using it only in endless functions, tests and the main package, and use time.NewTicker here (staticcheck)
go e.refresh(time.Tick(refreshRate))
^
adapters/yandex/yandex.go:159:40: SA1019: yandexExt.ImpID is deprecated: in favor of `PlacementID` (staticcheck)
placementID.ImpID = strconv.Itoa(int(yandexExt.ImpID))
^
adapters/yandex/yandex.go:160:41: SA1019: yandexExt.PageID is deprecated: in favor of `PlacementID` (staticcheck)
placementID.PageID = strconv.Itoa(int(yandexExt.PageID))
^
server/ssl/ssl_test.go:15:14: SA1019: certPool.Subjects has been deprecated since Go 1.18: if s was returned by [SystemCertPool], Subjects will not include the system roots. (staticcheck)
subjects := certPool.Subjects()
^
server/ssl/ssl_test.go:25:13: SA1019: certPool.Subjects has been deprecated since Go 1.18: if s was returned by [SystemCertPool], Subjects will not include the system roots. (staticcheck)
subjects = certPool.Subjects()
^
server/ssl/ssl_test.go:40:14: SA1019: certPool.Subjects has been deprecated since Go 1.18: if s was returned by [SystemCertPool], Subjects will not include the system roots. (staticcheck)
subjects := certPool.Subjects()
^
adapters/rubicon/rubicon.go:387:4: SA4006: this value of `err` is never used (staticcheck)
videoCopy.Ext, err = json.Marshal(&videoExt)
^
adapters/rubicon/rubicon.go:450:4: SA4006: this value of `err` is never used (staticcheck)
siteCopy.Publisher.Ext, err = json.Marshal(&pubExt)
^
analytics/agma/sender_test.go:125:2: SA4006: this value of `err` is never used (staticcheck)
sender, err := createHttpSender(client, config.AgmaAnalyticsHttpEndpoint{
^
adapters/adgeneration/adgeneration_test.go:248:5: SA5011(related information): this check suggests that the pointer can be nil (staticcheck)
if bidderResponse == nil {
^
adapters/adgeneration/adgeneration_test.go:264:40: SA5011: possible nil pointer dereference (staticcheck)
assert.Equal(t, 1, len(bidderResponse.Bids))
^
adapters/adgeneration/adgeneration_test.go:265:45: SA5011: possible nil pointer dereference (staticcheck)
assert.Equal(t, expectedID, bidderResponse.Bids[0].Bid.ID)
^
adapters/adgeneration/adgeneration_test.go:266:48: SA5011: possible nil pointer dereference (staticcheck)
assert.Equal(t, expectedImpID, bidderResponse.Bids[0].Bid.ImpID)
^
exchange/bidder_test.go:1068:20: SA5011(related information): this check suggests that the pointer can be nil (staticcheck)
assert.Falsef(t, seatBid == nil && tc.expectedBidsCount != 0, tc.description)
^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The output of
$ golangci-lint run --disable-all -E staticcheck ./...
:https://gist.github.com/dmitris/9e0dcaeba2c55ada6071dc844a7f7df0
It would be great to go through those issues, decide which ones should be addressed and fix them.
The text was updated successfully, but these errors were encountered: