From 52584be91b4d303c93921f5a31deb339070816f2 Mon Sep 17 00:00:00 2001 From: corverroos Date: Wed, 6 Apr 2022 08:54:02 +0200 Subject: [PATCH] *: fix build, remove nolints --- app/lifecycle/manager.go | 1 - app/retry/retry.go | 2 +- core/leadercast/leadercast.go | 2 +- testutil/beaconmock/server.go | 2 +- testutil/genchangelog/main.go | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/lifecycle/manager.go b/app/lifecycle/manager.go index 80a3757df..8cf965b6e 100644 --- a/app/lifecycle/manager.go +++ b/app/lifecycle/manager.go @@ -158,7 +158,6 @@ func (m *Manager) Run(appCtx context.Context) error { } // run starts and stops all the provided hooks. -//nolint:contextcheck // Explicit context wrangling. func run(appCtx context.Context, startHooks, stopHooks []hook) error { // Collect any first error, to return at the end. firstErr := make(chan error, 1) diff --git a/app/retry/retry.go b/app/retry/retry.go index 3a5a014fd..dbf70f609 100644 --- a/app/retry/retry.go +++ b/app/retry/retry.go @@ -176,7 +176,7 @@ func isTemporaryBeaconErr(err error) bool { // Check for timing errors like: // - Proposer duties were requested for a future epoch. // - Cannot create attestation for future slot. - if strings.Contains(err.Error(), "future") { //nolint:gosimple // More checks will be added below. + if strings.Contains(err.Error(), "future") { return true } diff --git a/core/leadercast/leadercast.go b/core/leadercast/leadercast.go index 1099d7f7c..26628331a 100644 --- a/core/leadercast/leadercast.go +++ b/core/leadercast/leadercast.go @@ -56,7 +56,7 @@ func (l *LeaderCast) Run(ctx context.Context) error { for { source, duty, data, err := l.transport.AwaitNext(ctx) if errors.Is(err, context.Canceled) && ctx.Err() != nil { - return nil //nolint:nilerr + return nil } else if err != nil { log.Error(ctx, "await next leader duty", err) continue diff --git a/testutil/beaconmock/server.go b/testutil/beaconmock/server.go index cba254351..038ee13ac 100644 --- a/testutil/beaconmock/server.go +++ b/testutil/beaconmock/server.go @@ -195,7 +195,7 @@ func newHTTPMock(overrides ...staticOverride) (HTTPMock, *http.Server, error) { // Wait for server to be up for { - resp, err := http.Get(addr + "/up") //nolint:bodyclose,noctx + resp, err := http.Get(addr + "/up") if err == nil && resp.StatusCode == http.StatusOK { break } diff --git a/testutil/genchangelog/main.go b/testutil/genchangelog/main.go index e01b42b1a..e468b0ad0 100644 --- a/testutil/genchangelog/main.go +++ b/testutil/genchangelog/main.go @@ -170,7 +170,7 @@ func run(gitRange string, output string, token string) error { func makeIssueFunc(token string) func(int) (string, error) { return func(number int) (string, error) { u := fmt.Sprintf("https://api.github.com/repos/obolnetwork/charon/issues/%d", number) - req, err := http.NewRequest("GET", u, nil) //nolint:noctx + req, err := http.NewRequest("GET", u, nil) if err != nil { return "", errors.Wrap(err, "new request") }