Skip to content

Commit

Permalink
Address staticcheck false positives (#43800)
Browse files Browse the repository at this point in the history
  • Loading branch information
codingllama authored Jul 3, 2024
1 parent 43c56ca commit ff9988f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/srv/usermgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ func (u *HostUserManagement) UpsertUser(name string, ui *services.HostUsersInfo)

var home string
if ui.Mode != types.CreateHostUserMode_HOST_USER_MODE_INSECURE_DROP {
//nolint:staticcheck // SA4023. False positive on macOS.
home, err = readDefaultHome(name)
//nolint:staticcheck // SA4023. False positive on macOS.
if err != nil {
return nil, trace.Wrap(err)
}
Expand Down
1 change: 1 addition & 0 deletions lib/srv/usermgmt_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func newHostSudoersBackend(_ string) (HostSudoersBackend, error) {
return nil, trace.NotImplemented("Host user creation management is only supported on linux")
}

//nolint:staticcheck // intended to always return an error for non-linux builds
func readDefaultHome(user string) (string, error) {
return "", trace.NotImplemented("readDefaultHome is only supported on linux")
}

0 comments on commit ff9988f

Please sign in to comment.