diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 5872c576441..6adbf290c0e 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -14,17 +14,17 @@ jobs: name: lint runs-on: ubuntu-latest steps: - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v5 with: go-version: 1.21 - uses: actions/checkout@v4 - name: lint-host-ctr - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: version: latest working-directory: sources/host-ctr - name: lint-ecs-gpu-init - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: version: latest working-directory: sources/ecs-gpu-init diff --git a/.golangci.yaml b/.golangci.yaml index 7ebf24eea64..964e117a589 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -12,6 +12,7 @@ linters: run: timeout: 3m - skip-dirs: +issues: + exclude-dirs: - vendor - .gomodcache diff --git a/sources/host-ctr/cmd/host-ctr/main.go b/sources/host-ctr/cmd/host-ctr/main.go index 260b5337499..7519baa4a5e 100644 --- a/sources/host-ctr/cmd/host-ctr/main.go +++ b/sources/host-ctr/cmd/host-ctr/main.go @@ -140,7 +140,7 @@ func App() *cli.App { Value: false, }, }, - Action: func(c *cli.Context) error { + Action: func(_ *cli.Context) error { return runCtr(containerdSocket, namespace, containerID, source, superpowered, registryConfig, containerType(cType), useCachedImage) }, }, @@ -191,7 +191,7 @@ func App() *cli.App { Required: true, }, }, - Action: func(c *cli.Context) error { + Action: func(_ *cli.Context) error { return cleanUp(containerdSocket, namespace, containerID) }, }, @@ -980,7 +980,7 @@ func withSwapManagement(_ context.Context, _ oci.Client, _ *containers.Container // withProxyEnv reads proxy environment variables and returns a spec option for passing said proxy environment variables func withProxyEnv() oci.SpecOpts { - noOp := func(_ context.Context, _ oci.Client, _ *containers.Container, s *runtimespec.Spec) error { return nil } + noOp := func(_ context.Context, _ oci.Client, _ *containers.Container, _ *runtimespec.Spec) error { return nil } httpsProxy, httpsProxySet := os.LookupEnv("HTTPS_PROXY") noProxy, noProxySet := os.LookupEnv("NO_PROXY") withHTTPSProxy := noOp