Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump golangci-lint, fix an error path #3515

Merged
merged 2 commits into from
Jun 29, 2022
Merged

Commits on Jun 16, 2022

  1. libct: fix staticcheck warning

    A new version of staticcheck (included into golangci-lint 1.46.2) gives
    this new warning:
    
    > libcontainer/factory_linux.go:230:59: SA9008: e refers to the result of a failed type assertion and is a zero value, not the value that was being type-asserted (staticcheck)
    > 				err = fmt.Errorf("panic from initialization: %v, %s", e, debug.Stack())
    > 				                                                      ^
    > libcontainer/factory_linux.go:226:7: SA9008(related information): this is the variable being read (staticcheck)
    > 			if e, ok := e.(error); ok {
    > 			   ^
    
    Apparently, this is indeed a bug. Fix by using a different name for a
    new variable, so we can access the old one under "else".
    
    Signed-off-by: Kir Kolyshkin <[email protected]>
    kolyshkin committed Jun 16, 2022
    Configuration menu
    Copy the full SHA
    6662570 View commit details
    Browse the repository at this point in the history
  2. ci: bump golangci-lint to 1.46

    Signed-off-by: Kir Kolyshkin <[email protected]>
    kolyshkin committed Jun 16, 2022
    Configuration menu
    Copy the full SHA
    7481c3c View commit details
    Browse the repository at this point in the history