Skip to content

Commit

Permalink
Merge pull request #2943 from ActiveState/mitchell/dx-1509
Browse files Browse the repository at this point in the history
Update .golangci.yaml and fixed nil pointer dereference.
  • Loading branch information
mitchell-as authored Dec 13, 2023
2 parents 098d4a4 + 45f2427 commit d64ab90
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
20 changes: 14 additions & 6 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions internal/runbits/runtime/rationalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit d64ab90

Please sign in to comment.