Skip to content

Commit f0baaff

Browse files
committed
BUILD/MAJOR: go: upgrade to 1.25
1 parent 7477d91 commit f0baaff

65 files changed

Lines changed: 1350 additions & 378 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitlab-ci.yml

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
variables:
33
DOCKER_HOST: tcp://docker:2375
4-
GO_VERSION: "1.24"
4+
GO_VERSION: "1.25"
55
DOCKER_VERSION: "26.0"
66
stages:
77
- bots
@@ -66,10 +66,17 @@ generate:
6666
tags:
6767
- go
6868
before_script:
69-
- rm -rf models/*
69+
- find models -maxdepth 1 -type f -name "*.go" -exec rm {} \;
7070
- make models
7171
script:
72-
- test -z "$(git diff 2> /dev/null)" || exit "Models are not generated, issue \`make models\` and commit the result"
72+
- |
73+
# Check for unstaged changes
74+
if ! git diff --quiet 2>/dev/null; then
75+
echo "Diff output:"
76+
git diff
77+
echo "Models are not generated. Please run \`make models\` and commit the result."
78+
exit 1
79+
fi
7380
- test -z "$(git ls-files --others --exclude-standard 2> /dev/null)" || exit "Models generation created untracked files, cannot proceed"
7481
rules:
7582
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
@@ -197,34 +204,6 @@ test-equal:
197204
- docker image tag $CI_REGISTRY_GO/haproxy-alpine:$HAPROXY_VERSION haproxytech/haproxy-alpine:$HAPROXY_VERSION
198205
script:
199206
- DOCKER_HAPROXY_VERSION=$HAPROXY_VERSION make e2e-docker
200-
HAProxy-2.2:
201-
extends: .e2e
202-
variables:
203-
HAPROXY_VERSION: "2.2"
204-
HAProxy-2.4:
205-
extends: .e2e
206-
variables:
207-
HAPROXY_VERSION: "2.4"
208-
HAProxy-2.6:
209-
extends: .e2e
210-
variables:
211-
HAPROXY_VERSION: "2.6"
212-
HAProxy-2.8:
213-
extends: .e2e
214-
variables:
215-
HAPROXY_VERSION: "2.8"
216-
HAProxy-2.9:
217-
extends: .e2e
218-
variables:
219-
HAPROXY_VERSION: "2.9"
220-
HAProxy-3.0:
221-
extends: .e2e
222-
variables:
223-
HAPROXY_VERSION: "3.0"
224-
HAProxy-3.1:
225-
extends: .e2e
226-
variables:
227-
HAPROXY_VERSION: "3.1"
228207
HAProxy-3.2:
229208
extends: .e2e
230209
variables:

.golangci.yml

Lines changed: 59 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,66 @@
1-
---
2-
linters-settings:
3-
golint:
4-
min-confidence: 0
5-
gocyclo:
6-
min-complexity: 42
7-
cyclop:
8-
max-complexity: 42
9-
maligned:
10-
suggest-new: true
11-
dupl:
12-
threshold: 200
13-
goconst:
14-
min-len: 2
15-
min-occurrences: 3
16-
gci:
17-
prefix: github.com/haproxytech/client-native/v6
18-
1+
version: "2"
192
linters:
20-
enable-all: true
3+
settings:
4+
cyclop:
5+
max-complexity: 42
6+
gocyclo:
7+
min-complexity: 42
8+
default: all
219
disable:
22-
- mnd
10+
- depguard
11+
- dupword
12+
- dupl
2313
- err113
24-
- wsl
25-
- wrapcheck
26-
- godot
27-
- varnamelen
28-
- nlreturn
29-
- ireturn
30-
- interfacebloat
31-
- forcetypeassert
3214
- exhaustruct
33-
- dupword
34-
- nestif
35-
- lll
36-
- depguard
15+
- forcetypeassert
16+
- funcorder
3717
- funlen
38-
- gci
3918
- goconst
19+
- godoclint
20+
- godot
21+
- interfacebloat
22+
- ireturn
23+
- lll
24+
- mnd
25+
- nestif
26+
- nlreturn
27+
- noinlineerr
4028
- recvcheck
41-
- tenv # deprecated
42-
43-
issues:
44-
exclude-files:
45-
- ".*_test\\.go$"
46-
exclude-dirs:
47-
- test
48-
exclude:
49-
- "unused-parameter: parameter 'comment' seems to be unused"
50-
- "unused-parameter: parameter 'parts' seems to be unused"
51-
- "unused-parameter: parameter 'parserType' seems to be unused"
29+
- revive
30+
- varnamelen
31+
- wrapcheck
32+
- wsl
33+
- wsl_v5
34+
exclusions:
35+
generated: lax
36+
presets:
37+
- comments
38+
- common-false-positives
39+
- legacy
40+
- std-error-handling
41+
rules:
42+
- path: (.+)\.go$
43+
text: 'unused-parameter: parameter ''comment'' seems to be unused'
44+
- path: (.+)\.go$
45+
text: 'unused-parameter: parameter ''parts'' seems to be unused'
46+
- path: (.+)\.go$
47+
text: 'unused-parameter: parameter ''parserType'' seems to be unused'
48+
paths:
49+
- .*_test\.go$
50+
- test
51+
- third_party$
52+
- builtin$
53+
- examples$
54+
formatters:
55+
enable:
56+
- gofmt
57+
- gofumpt
58+
- goimports
59+
exclusions:
60+
generated: lax
61+
paths:
62+
- .*_test\.go$
63+
- test
64+
- third_party$
65+
- builtin$
66+
- examples$

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ PROJECT_PATH=${PWD}
22
DOCKER_HAPROXY_VERSION?=3.2
33
SWAGGER_VERSION=v0.32.3
44
GO_VERSION:=${shell go mod edit -json | jq -r .Go}
5-
GOLANGCI_LINT_VERSION=1.64.5
6-
CHECK_COMMIT=5.1.1
5+
GOLANGCI_LINT_VERSION=2.8.0
6+
CHECK_COMMIT=5.2.0
77

88
.PHONY: test
99
test:

0 commit comments

Comments
 (0)