Skip to content

Commit f65c324

Browse files
committed
chore: bump golang + golangci-lint
1 parent d31a1ff commit f65c324

File tree

3 files changed

+147
-137
lines changed

3 files changed

+147
-137
lines changed

.golangci.yml

Lines changed: 144 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -1,144 +1,155 @@
1-
linters-settings:
2-
whitespace:
3-
multi-if: true
4-
multi-func: false
5-
errcheck:
6-
check-type-assertions: true
7-
goconst:
8-
min-len: 2
9-
min-occurrences: 3
10-
gocritic:
11-
enabled-tags:
12-
- diagnostic
13-
- experimental
14-
- opinionated
15-
- performance
16-
- style
17-
govet:
18-
enable-all: true
19-
disable:
20-
- fieldalignment
21-
nolintlint:
22-
require-explanation: true
23-
require-specific: true
24-
varnamelen:
25-
min-name-length: 2
26-
max-distance: 12
27-
unparam:
28-
check-exported: true
29-
depguard:
30-
rules:
31-
cmd:
32-
list-mode: strict
33-
files:
34-
- "**/cmd/**/*.go"
35-
- "**/cmd/*.go"
36-
allow:
37-
- $all
38-
- $gostd
39-
- "github.com/spf13/cobra"
40-
- "github.com/backup-blob/zfs-backup-blob/internal/driver"
41-
- "github.com/backup-blob/zfs-backup-blob/internal/repository"
42-
- "github.com/backup-blob/zfs-backup-blob/internal/usecase"
43-
- "github.com/backup-blob/zfs-backup-blob/internal/domain"
44-
- "github.com/backup-blob/zfs-backup-blob/cmd/command"
45-
- "github.com/backup-blob/zfs-backup-blob/pkg/format"
46-
- "github.com/golobby/container/v3"
47-
repo:
48-
list-mode: strict
49-
files:
50-
- "**/internal/repository/**/*.go"
51-
- "**/internal/repository/*.go"
52-
allow:
53-
- $gostd
54-
- "gopkg.in/yaml.v3"
55-
- "github.com/backup-blob/zfs-backup-blob/internal/domain"
56-
- "github.com/backup-blob/zfs-backup-blob/internal/driver"
57-
usecase:
58-
list-mode: strict
59-
files:
60-
- "**/internal/usecase/**/*.go"
61-
- "**/internal/usecase/*.go"
62-
allow:
63-
- $gostd
64-
- "github.com/backup-blob/zfs-backup-blob/internal/domain"
65-
- "github.com/backup-blob/zfs-backup-blob/internal/repository"
66-
driver:
67-
list-mode: strict
68-
files:
69-
- "**/internal/driver/**/*.go"
70-
- "**/internal/driver/*.go"
71-
allow:
72-
- $gostd
73-
- "gopkg.in/yaml.v3"
74-
- "github.com/go-playground/validator/v10"
75-
- "github.com/backup-blob/zfs-backup-blob/internal/domain"
76-
- "github.com/backup-blob/zfs-backup-blob/pkg"
77-
- "github.com/aws/aws-sdk-go-v2"
78-
- "github.com/rs/zerolog"
79-
- "github.com/jedib0t/go-pretty/v6/table"
80-
deny:
81-
- pkg: "github.com/backup-blob/zfs-backup-blob/internal/repository"
82-
desc: not allowed
83-
- pkg: "github.com/backup-blob/zfs-backup-blob/internal/usecase"
84-
desc: not allowed
85-
pkg:
86-
list-mode: strict
87-
files:
88-
- "**/pkg/**/*.go"
89-
- "**/pkg/*.go"
90-
allow:
91-
- $all
92-
- $gostd
93-
- "github.com/fujiwara/shapeio"
94-
- "github.com/docker/go-units"
95-
deny:
96-
- pkg: "github.com/backup-blob/zfs-backup-blob/internal"
97-
desc: not allowed
98-
1+
version: "2"
2+
run:
3+
issues-exit-code: 1
4+
tests: false
995
linters:
100-
disable-all: true
6+
default: none
1017
enable:
102-
- wsl
103-
- govet
104-
- whitespace
105-
- varnamelen
106-
- unparam
107-
- unconvert
108-
- testpackage
109-
- tenv
110-
- nolintlint
111-
- nestif
112-
- nilerr
113-
- maintidx
114-
- gosec
115-
- mnd
116-
- goconst
117-
- gocritic
118-
- godot
1198
- bodyclose
1209
- containedctx
10+
- cyclop
12111
- depguard
12212
- dupl
12313
- durationcheck
12414
- errname
12515
- forcetypeassert
126-
- cyclop
127-
run:
128-
issues-exit-code: 1
129-
tests: false
130-
16+
- goconst
17+
- gocritic
18+
- godot
19+
- gosec
20+
- govet
21+
- maintidx
22+
- mnd
23+
- nestif
24+
- nilerr
25+
- nolintlint
26+
- testpackage
27+
- unconvert
28+
- unparam
29+
- varnamelen
30+
- whitespace
31+
- wsl
32+
settings:
33+
depguard:
34+
rules:
35+
cmd:
36+
list-mode: strict
37+
files:
38+
- '**/cmd/**/*.go'
39+
- '**/cmd/*.go'
40+
allow:
41+
- $all
42+
- $gostd
43+
- github.com/spf13/cobra
44+
- github.com/backup-blob/zfs-backup-blob/internal/driver
45+
- github.com/backup-blob/zfs-backup-blob/internal/repository
46+
- github.com/backup-blob/zfs-backup-blob/internal/usecase
47+
- github.com/backup-blob/zfs-backup-blob/internal/domain
48+
- github.com/backup-blob/zfs-backup-blob/cmd/command
49+
- github.com/backup-blob/zfs-backup-blob/pkg/format
50+
- github.com/golobby/container/v3
51+
driver:
52+
list-mode: strict
53+
files:
54+
- '**/internal/driver/**/*.go'
55+
- '**/internal/driver/*.go'
56+
allow:
57+
- $gostd
58+
- gopkg.in/yaml.v3
59+
- github.com/go-playground/validator/v10
60+
- github.com/backup-blob/zfs-backup-blob/internal/domain
61+
- github.com/backup-blob/zfs-backup-blob/pkg
62+
- github.com/aws/aws-sdk-go-v2
63+
- github.com/rs/zerolog
64+
- github.com/jedib0t/go-pretty/v6/table
65+
deny:
66+
- pkg: github.com/backup-blob/zfs-backup-blob/internal/repository
67+
desc: not allowed
68+
- pkg: github.com/backup-blob/zfs-backup-blob/internal/usecase
69+
desc: not allowed
70+
pkg:
71+
list-mode: strict
72+
files:
73+
- '**/pkg/**/*.go'
74+
- '**/pkg/*.go'
75+
allow:
76+
- $all
77+
- $gostd
78+
- github.com/fujiwara/shapeio
79+
- github.com/docker/go-units
80+
deny:
81+
- pkg: github.com/backup-blob/zfs-backup-blob/internal
82+
desc: not allowed
83+
repo:
84+
list-mode: strict
85+
files:
86+
- '**/internal/repository/**/*.go'
87+
- '**/internal/repository/*.go'
88+
allow:
89+
- $gostd
90+
- gopkg.in/yaml.v3
91+
- github.com/backup-blob/zfs-backup-blob/internal/domain
92+
- github.com/backup-blob/zfs-backup-blob/internal/driver
93+
usecase:
94+
list-mode: strict
95+
files:
96+
- '**/internal/usecase/**/*.go'
97+
- '**/internal/usecase/*.go'
98+
allow:
99+
- $gostd
100+
- github.com/backup-blob/zfs-backup-blob/internal/domain
101+
- github.com/backup-blob/zfs-backup-blob/internal/repository
102+
errcheck:
103+
check-type-assertions: true
104+
goconst:
105+
min-len: 2
106+
min-occurrences: 3
107+
gocritic:
108+
enabled-tags:
109+
- diagnostic
110+
- experimental
111+
- opinionated
112+
- performance
113+
- style
114+
govet:
115+
disable:
116+
- fieldalignment
117+
enable-all: true
118+
nolintlint:
119+
require-explanation: true
120+
require-specific: true
121+
unparam:
122+
check-exported: true
123+
varnamelen:
124+
max-distance: 12
125+
min-name-length: 2
126+
whitespace:
127+
multi-if: true
128+
multi-func: false
129+
exclusions:
130+
generated: lax
131+
presets:
132+
- comments
133+
- common-false-positives
134+
- legacy
135+
- std-error-handling
136+
rules:
137+
- linters:
138+
- mnd
139+
text: 'Magic number: 2, in <condition> detected'
140+
paths:
141+
- .*_test.go$
142+
- pkg/fakemiddleware/fakemiddleware.go$
143+
- docs
144+
- third_party$
145+
- builtin$
146+
- examples$
131147
issues:
132148
max-same-issues: 0
133-
exclude-files:
134-
- ".*_test.go$"
135-
- "pkg/fakemiddleware/fakemiddleware.go$"
136-
exclude-dirs:
137-
- "docs"
138-
exclude-rules:
139-
- linters:
140-
- mnd
141-
text: "Magic number: 2, in <condition> detected"
142-
143-
output:
144-
show-stats: true
149+
formatters:
150+
exclusions:
151+
generated: lax
152+
paths:
153+
- third_party$
154+
- builtin$
155+
- examples$

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
golang 1.23.4
2-
golangci-lint 1.64.7
1+
golang 1.24.1
2+
golangci-lint 2.0.2

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
module github.com/backup-blob/zfs-backup-blob
22

3-
go 1.23.4
4-
toolchain go1.24.1
3+
go 1.24.1
54

65
require (
76
github.com/aws/aws-sdk-go-v2 v1.36.3

0 commit comments

Comments
 (0)