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

Update linter, fix new warnings. #3884

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ linters:

run:
timeout: 3m
skip-dirs:
issues:
exclude-dirs:
- vendor
- .gomodcache
6 changes: 3 additions & 3 deletions sources/host-ctr/cmd/host-ctr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
},
Expand Down Expand Up @@ -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)
},
},
Expand Down Expand Up @@ -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
Expand Down
Loading