diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0f2b00..cb4efae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ on: env: # Common versions GO_VERSION: '1.25.14' - GOLANGCI_VERSION: 'v2.12.2' + GOLANGCI_VERSION: 'v2.13.1' DOCKER_BUILDX_VERSION: 'v0.36.1' # These environment variables are important to the Crossplane CLI install.sh diff --git a/.golangci.yml b/.golangci.yml index 733cdfc..063bc8a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -62,6 +62,7 @@ linters: # useful in theory to catch fields that are accidentally omitted. Seems like # it would have many more false positives than useful catches, though. - exhaustruct + - exhaustruct_v5 # Warns about TODO comments. The rationale being they should be issues # instead. We're okay with using TODO to track minor cleanups for next time diff --git a/fn.go b/fn.go index 14269a0..adf62ed 100644 --- a/fn.go +++ b/fn.go @@ -215,7 +215,7 @@ func (f *Function) RunFunction(_ context.Context, req *fnv1.RunFunctionRequest) } // Initialize the requirements. - requirements := &fnv1.Requirements{ExtraResources: make(map[string]*fnv1.ResourceSelector), Resources: make(map[string]*fnv1.ResourceSelector)} + requirements := &fnv1.Requirements{ExtraResources: make(map[string]*fnv1.ResourceSelector), Resources: make(map[string]*fnv1.ResourceSelector)} //nolint:staticcheck // continue supporting deprecated interface // Override the TTL if specified in the observed composite. if v, found := observedComposite.Resource.GetAnnotations()[annotationKeyTTL]; found { diff --git a/fn_test.go b/fn_test.go index 137d543..9a65169 100644 --- a/fn_test.go +++ b/fn_test.go @@ -1115,7 +1115,7 @@ func TestRunFunction(t *testing.T) { Meta: &fnv1.ResponseMeta{Ttl: durationpb.New(response.DefaultTTL)}, Results: []*fnv1.Result{}, Requirements: &fnv1.Requirements{ - ExtraResources: map[string]*fnv1.ResourceSelector{ + ExtraResources: map[string]*fnv1.ResourceSelector{ //nolint:staticcheck // maintain support for deprecated interface "cool-extra-resource": { ApiVersion: "example.org/v1", Kind: "CoolExtraResource", @@ -1731,7 +1731,7 @@ func TestRunFunction(t *testing.T) { }, }, Requirements: &fnv1.Requirements{ - ExtraResources: map[string]*fnv1.ResourceSelector{ + ExtraResources: map[string]*fnv1.ResourceSelector{ //nolint:staticcheck // maintain support for deprecated interface "cool-extra-resource": { ApiVersion: "example.org/v1", Kind: "CoolExtraResource", @@ -1780,7 +1780,7 @@ func TestRunFunction(t *testing.T) { } } }`), - ExtraResources: map[string]*fnv1.Resources{ + ExtraResources: map[string]*fnv1.Resources{ //nolint:staticcheck // maintain support for deprecated interface "cool-extra-resource": { Items: []*fnv1.Resource{ { @@ -1835,7 +1835,7 @@ func TestRunFunction(t *testing.T) { }, }, Requirements: &fnv1.Requirements{ - ExtraResources: map[string]*fnv1.ResourceSelector{ + ExtraResources: map[string]*fnv1.ResourceSelector{ //nolint:staticcheck // maintain support for deprecated interface "cool-extra-resource": { ApiVersion: "example.org/v1", Kind: "CoolExtraResource",