Skip to content

🌱 Bump golangci/golangci-lint-action from 6.3.2 to 6.5.0 #319

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

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 .github/workflows/draft_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '^1.21'
go-version: '^1.23'
# - name: generate release notes
# run: |
# make release-notes
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pullrequests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: golangci-lint
uses: golangci/golangci-lint-action@v6.3.2
uses: golangci/golangci-lint-action@v6.5.0
with:
version: v1.60.2
version: v1.64.6

test:
name: test
Expand All @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: Run Tests
run: make test

Expand All @@ -38,7 +38,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
- name: run code generators
run: make generate
- name: run manifest generators
Expand Down
3 changes: 1 addition & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ linters:
- rowserrcheck
- staticcheck
- stylecheck
- tenv
- thelper
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- usetesting
- whitespace

linters-settings:
Expand Down Expand Up @@ -118,7 +118,6 @@ linters-settings:
alias: ipamv1
nolintlint:
allow-unused: false
allow-leading-space: false
require-specific: true
revive:
rules:
Expand Down
22 changes: 11 additions & 11 deletions internal/webhooks/inclusterippool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ func TestPoolDeletionWithExistingIPAddresses(t *testing.T) {
Client: fakeClient,
}

g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().NotTo(BeNil(), "should not allow deletion when claims exist")
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().NotTo(BeNil(), "should not allow deletion when claims exist")
g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().To(HaveOccurred(), "should not allow deletion when claims exist")
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().To(HaveOccurred(), "should not allow deletion when claims exist")

g.Expect(fakeClient.DeleteAllOf(ctx, &ipamv1.IPAddress{})).To(Succeed())

g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().To(BeNil(), "should allow deletion when no claims exist")
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().To(BeNil(), "should allow deletion when no claims exist")
g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().NotTo(HaveOccurred(), "should allow deletion when no claims exist")
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().NotTo(HaveOccurred(), "should allow deletion when no claims exist")
}

func TestUpdatingPoolInUseAddresses(t *testing.T) {
Expand Down Expand Up @@ -135,8 +135,8 @@ func TestUpdatingPoolInUseAddresses(t *testing.T) {
namespacedPool.Spec.Addresses = []string{"10.0.0.15-10.0.0.20"}
globalPool.Spec.Addresses = []string{"10.0.0.15-10.0.0.20"}

g.Expect(webhook.ValidateUpdate(ctx, oldNamespacedPool, namespacedPool)).Error().NotTo(BeNil(), "should not allow removing in use IPs from addresses field in pool")
g.Expect(webhook.ValidateUpdate(ctx, oldGlobalPool, globalPool)).Error().NotTo(BeNil(), "should not allow removing in use IPs from addresses field in pool")
g.Expect(webhook.ValidateUpdate(ctx, oldNamespacedPool, namespacedPool)).Error().To(HaveOccurred(), "should not allow removing in use IPs from addresses field in pool")
g.Expect(webhook.ValidateUpdate(ctx, oldGlobalPool, globalPool)).Error().To(HaveOccurred(), "should not allow removing in use IPs from addresses field in pool")
}

func TestDeleteSkip(t *testing.T) {
Expand Down Expand Up @@ -188,8 +188,8 @@ func TestDeleteSkip(t *testing.T) {
Client: fakeClient,
}

g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().To(BeNil())
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().To(BeNil())
g.Expect(webhook.ValidateDelete(ctx, namespacedPool)).Error().NotTo(HaveOccurred())
g.Expect(webhook.ValidateDelete(ctx, globalPool)).Error().NotTo(HaveOccurred())
}

func TestInClusterIPPoolDefaulting(t *testing.T) {
Expand Down Expand Up @@ -701,9 +701,9 @@ func TestIPPool_Prefix(t *testing.T) {
Client: fakeClient,
}

g.Expect(webhook.validate(&v1alpha2.InClusterIPPool{}, namespacedPool)).Error().To(BeNil(), "should allow /0 prefix InClusterIPPool")
g.Expect(webhook.validate(&v1alpha2.GlobalInClusterIPPool{}, globalPool)).Error().To(BeNil(), "should allow /0 prefix GlobalInClusterIPPool")
g.Expect(webhook.validate(&v1alpha2.InClusterIPPool{}, emptyPrefixPool)).Error().To(BeNil(), "should allow empty prefix InClusterIPPool")
g.Expect(webhook.validate(&v1alpha2.InClusterIPPool{}, namespacedPool)).Error().NotTo(HaveOccurred(), "should allow /0 prefix InClusterIPPool")
g.Expect(webhook.validate(&v1alpha2.GlobalInClusterIPPool{}, globalPool)).Error().NotTo(HaveOccurred(), "should allow /0 prefix GlobalInClusterIPPool")
g.Expect(webhook.validate(&v1alpha2.InClusterIPPool{}, emptyPrefixPool)).Error().NotTo(HaveOccurred(), "should allow empty prefix InClusterIPPool")
}

func runInvalidScenarioTests(t *testing.T, tt invalidScenarioTest, pool types.GenericInClusterPool, webhook InClusterIPPool) {
Expand Down