diff --git a/.golangci.yaml b/.golangci.yaml index 8bd835bdbd..983e2d33a2 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -5,12 +5,20 @@ run: linters-settings: errcheck: exclude-functions: - - (*github.com/ActiveState/termtest.ConsoleProcess).Expect - - (*github.com/ActiveState/termtest.ConsoleProcess).ExpectExitCode - - (*github.com/ActiveState/termtest.ConsoleProcess).ExpectNotExitCode - - (*github.com/ActiveState/termtest.ConsoleProcess).ExpectRe - - (*github.com/ActiveState/termtest.ConsoleProcess).Expect - - (*github.com/ActiveState/termtest.ConsoleProcess).WaitForInput + - (*github.com/ActiveState/termtest.TermTest).Expect + - (*github.com/ActiveState/termtest.TermTest).ExpectExitCode + - (*github.com/ActiveState/termtest.TermTest).ExpectNotExitCode + - (*github.com/ActiveState/termtest.TermTest).ExpectRe + - (*github.com/ActiveState/termtest.TermTest).Expect + - (*github.com/ActiveState/termtest.TermTest).WaitForInput + - (*github.com/ActiveState/termtest.TermTest).SendLine + - (*github.com/ActiveState/termtest.TermTest).ExpectInput + - (*github.com/ActiveState/termtest.TermTest).Wait + - (*github.com/ActiveState/logging.fileHandler).Printf + - (*github.com/ActiveState/logging.standardHandler).Printf + govet: + disable: + - composites # When issues occur with linting us the snippet below to help with debugging # linters: diff --git a/internal/runbits/runtime/rationalize.go b/internal/runbits/runtime/rationalize.go index 0039f3b159..8ee59c0b34 100644 --- a/internal/runbits/runtime/rationalize.go +++ b/internal/runbits/runtime/rationalize.go @@ -15,14 +15,14 @@ import ( ) func rationalizeError(auth *authentication.Auth, proj *project.Project, rerr *error) { + if rerr == nil { + return + } var errNoMatchingPlatform *model.ErrNoMatchingPlatform var errArtifactSetup *setup.ArtifactSetupErrors isUpdateErr := errs.Matches(*rerr, &ErrUpdate{}) switch { - case rerr == nil: - return - case proj == nil: multilog.Error("runtime:rationalizeError called with nil project, error: %s", errs.JoinMessage(*rerr)) *rerr = errs.Pack(*rerr, errs.New("project is nil"))