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

🌱 lint: enable containedctx lint #2297

Merged
merged 1 commit into from
Aug 29, 2023
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
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ linters:
- asciicheck
- bidichk
- bodyclose
# - containedctx
- containedctx
- dogsled
- dupword
- durationcheck
Expand Down
2 changes: 1 addition & 1 deletion pkg/context/controller_manager_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
// ControllerManagerContext is the context of the controller that owns the
// controllers.
type ControllerManagerContext struct {
context.Context
context.Context //nolint:containedctx

// Namespace is the namespace in which the resource is located responsible
// for running the controller manager.
Expand Down
4 changes: 2 additions & 2 deletions pkg/services/govmomi/cluster/cluster_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ func TestCluster(t *testing.T) {
}

type testComputeClusterCtx struct {
context.Context
finder *find.Finder
context.Context //nolint:containedctx
finder *find.Finder
}

func (t testComputeClusterCtx) GetSession() *session.Session {
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/fetch_object.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
)

type FetchObjectInput struct {
context.Context
context.Context //nolint:containedctx
ctrlclient.Client
Object ctrlclient.Object
}
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/vmware/intg_test_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
// IntegrationTestContext is used for integration testing
// Supervisor controllers.
type IntegrationTestContext struct {
context.Context
context.Context //nolint:containedctx
Client client.Client
GuestClient client.Client
Namespace string
Expand Down
Loading