Skip to content

Commit

Permalink
*: fix build, remove nolints (#366)
Browse files Browse the repository at this point in the history
Removes some `nolint` directives for linters that are now disabled in go1.18 since they are not supported yet.  Once golangci-lint re-enables then, we might neeed to re-add these directives.

category: fixbuild
ticket: none
  • Loading branch information
corverroos authored Apr 6, 2022
1 parent 113aba2 commit 9a2c216
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion app/lifecycle/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion core/leadercast/leadercast.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion testutil/beaconmock/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion testutil/genchangelog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 9a2c216

Please sign in to comment.