Skip to content

Commit

Permalink
Merge pull request #6511 from thaJeztah/1.5_backport_golangci_lint_fix
Browse files Browse the repository at this point in the history
[release/1.5 backport] GHA fixes, update GolangCI-Lint v1.42.0, and go-mdman v2.0.1
  • Loading branch information
dmcgowan committed Feb 3, 2022
2 parents dff924c + e7cd5a3 commit 2d28d56
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -24,6 +24,10 @@ jobs:
os: [ubuntu-18.04, macos-10.15, windows-2019]

steps:
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- uses: actions/checkout@v2
with:
path: src/github.com/containerd/containerd
Expand All @@ -36,9 +40,10 @@ jobs:
- uses: golangci/golangci-lint-action@v2
with:
version: v1.36.0
version: v1.42.0
working-directory: src/github.com/containerd/containerd
args: --timeout=5m
skip-go-installation: true

#
# Project checks
Expand Down Expand Up @@ -127,7 +132,7 @@ jobs:
with:
path: src/github.com/containerd/containerd

- run: GO111MODULE=on go get github.com/cpuguy83/go-md2man/v2@v2.0.0
- run: GO111MODULE=on go get github.com/cpuguy83/go-md2man/v2@v2.0.1

- run: make man
working-directory: src/github.com/containerd/containerd
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Expand Up @@ -6,7 +6,7 @@ linters:
- unconvert
- gofmt
- goimports
- golint
- revive
- ineffassign
- vet
- unused
Expand Down
2 changes: 1 addition & 1 deletion pkg/cri/server/sandbox_run.go
Expand Up @@ -121,7 +121,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox
// handle. NetNSPath in sandbox metadata and NetNS is non empty only for non host network
// namespaces. If the pod is in host network namespace then both are empty and should not
// be used.
var netnsMountDir string = "/var/run/netns"
var netnsMountDir = "/var/run/netns"
if c.config.NetNSMountsUnderStateDir {
netnsMountDir = filepath.Join(c.config.StateDir, "netns")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/os/os_windows.go
Expand Up @@ -58,7 +58,7 @@ func openPath(path string) (windows.Handle, error) {
}

// GetFinalPathNameByHandle flags.
//nolint:golint
//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
const (
cFILE_NAME_OPENED = 0x8

Expand Down
4 changes: 2 additions & 2 deletions script/setup/install-dev-tools
Expand Up @@ -33,5 +33,5 @@ GO111MODULE=on go get github.com/stevvooe/protobuild
GO111MODULE=off go get -d github.com/gogo/googleapis || true
GO111MODULE=off go get -d github.com/gogo/protobuf || true

GO111MODULE=on go get github.com/cpuguy83/go-md2man/v2@v2.0.0
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.38.0
GO111MODULE=on go get github.com/cpuguy83/go-md2man/v2@v2.0.1
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.0
2 changes: 1 addition & 1 deletion snapshots/testsuite/testsuite.go
Expand Up @@ -18,7 +18,7 @@ package testsuite

import (
"context"
//nolint:golint
//nolint:revive // go-digest needs the blank import. See https://github.com/opencontainers/go-digest#usage.
_ "crypto/sha256"
"fmt"
"io/ioutil"
Expand Down

0 comments on commit 2d28d56

Please sign in to comment.