Skip to content

Commit 2da0b81

Browse files
bramweltclaude
andcommitted
chore: upgrade golangci-lint to v2.12.2
Bump golangci-lint from v2.2.2 to v2.12.2 (built with go1.25.10) to resolve build failure against go 1.25.0. Fix four new lint issues surfaced by the upgrade. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
1 parent 2956c63 commit 2da0b81

4 files changed

Lines changed: 5 additions & 8 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ GOOS := linux
2222
GOARCH := amd64
2323

2424
# Linting
25-
GOLANGCI_LINT_VERSION := v2.2.2
25+
GOLANGCI_LINT_VERSION := v2.12.2
2626
LINT_TIMEOUT := 10m
2727
LINT_TOOL=$(shell go env GOPATH)/bin/golangci-lint
2828

cmd/service/service_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,6 @@ func TestQuerySvcsrvc_InterfaceCompliance(t *testing.T) {
594594
mockOrgSearcher := mock.NewMockOrganizationSearcher()
595595
service := NewQuerySvc(mockResourceSearcher, mockAccessChecker, mock.NewMockResourceFilter(), mockOrgSearcher, mock.NewMockAuthService())
596596

597-
// This will fail to compile if querySvcsrvc doesn't implement querysvc.Service
598-
var _ querysvc.Service = service
599-
597+
var _ querysvc.Service = (*querySvcsrvc)(nil)
600598
assert.NotNil(t, service)
601599
}

internal/service/organization_search_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -759,15 +759,14 @@ func TestOrganizationSearchInterface(t *testing.T) {
759759
mockSearcher := mock.NewMockOrganizationSearcher()
760760
service := NewOrganizationSearch(mockSearcher)
761761

762-
// Verify that the service implements the interface
763-
var _ OrganizationSearcher = service
762+
var _ OrganizationSearcher = (*OrganizationSearch)(nil)
764763
assertion.NotNil(service)
765764
})
766765

767766
t.Run("interface methods are callable", func(t *testing.T) {
768767
// Setup
769768
mockSearcher := mock.NewMockOrganizationSearcher()
770-
var service OrganizationSearcher = NewOrganizationSearch(mockSearcher)
769+
var service OrganizationSearcher = NewOrganizationSearch(mockSearcher) //nolint:staticcheck
771770

772771
ctx := context.Background()
773772
criteria := model.OrganizationSearchCriteria{

pkg/httpclient/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (c *Client) doRequest(ctx context.Context, reqConfig Request) (*Response, e
102102
if err != nil {
103103
return nil, fmt.Errorf("HTTP request failed: %w", err)
104104
}
105-
defer resp.Body.Close()
105+
defer func() { _ = resp.Body.Close() }()
106106

107107
body, err := io.ReadAll(resp.Body)
108108
if err != nil {

0 commit comments

Comments
 (0)