diff --git a/.golangci.yml b/.golangci.yml index 063292f35..1b9f485ec 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -23,10 +23,8 @@ linters: enable-all: true disable: # deprecated linters - - deadcode - - ifshort - - varcheck - - nosnakecase + - execinquery + - exportloopref #################### # conflicted with go fmt @@ -35,24 +33,21 @@ linters: # workaround to avoid linter failures of getting malformed json - musttag + - err113 + - bodyclose - contextcheck - nilerr - noctx - rowserrcheck - sqlclosecheck - - structcheck - tparallel - - vetshadow - errname - forcetypeassert - gocyclo - unparam - nakedret - lll - - golint - - maligned - - scopelint - dupl - gosec - gochecknoinits @@ -63,15 +58,12 @@ linters: - staticcheck - stylecheck - wsl - - interfacer - varnamelen - tagliatelle - gomnd - nlreturn - wrapcheck - wastedassign - - goerr113 - - exhaustivestruct - durationcheck - errorlint - cyclop diff --git a/client.go b/client.go index 9f0fe2a1c..beafdbc1f 100644 --- a/client.go +++ b/client.go @@ -794,7 +794,7 @@ func NewClientFromEnv(hc *http.Client) (*Client, error) { client.selectedProfile = configProfile // We should only load the config if the config file exists - if _, err := os.Stat(configPath); err != nil { + if _, err = os.Stat(configPath); err != nil { return nil, fmt.Errorf("error loading config file %s: %w", configPath, err) } diff --git a/config.go b/config.go index 6bccf83f7..66d73f9b6 100644 --- a/config.go +++ b/config.go @@ -140,7 +140,7 @@ func resolveValidConfigPath() (string, error) { return "", err } - if _, err := os.Stat(p); err != nil { + if _, err = os.Stat(p); err != nil { continue } diff --git a/waitfor.go b/waitfor.go index e65e491a9..3d709a041 100644 --- a/waitfor.go +++ b/waitfor.go @@ -739,7 +739,7 @@ func (p *EventPoller) WaitForFinished( for { select { case <-ticker.C: - event, err := p.client.GetEvent(ctx, event.ID) + event, err = p.client.GetEvent(ctx, event.ID) if err != nil { return nil, fmt.Errorf("failed to get event: %w", err) }