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
- - " github.com/backup-blob/zfs-backup-blob/internal/domain"
55
- - " github.com/backup-blob/zfs-backup-blob/internal/driver"
56
- usecase :
57
- list-mode : strict
58
- files :
59
- - " **/internal/usecase/**/*.go"
60
- - " **/internal/usecase/*.go"
61
- allow :
62
- - $gostd
63
- - " github.com/backup-blob/zfs-backup-blob/internal/domain"
64
- - " github.com/backup-blob/zfs-backup-blob/internal/repository"
65
- driver :
66
- list-mode : strict
67
- files :
68
- - " **/internal/driver/**/*.go"
69
- - " **/internal/driver/*.go"
70
- allow :
71
- - $gostd
72
- - " github.com/go-playground/validator/v10"
73
- - " github.com/backup-blob/zfs-backup-blob/internal/domain"
74
- - " github.com/backup-blob/zfs-backup-blob/pkg"
75
- - " github.com/aws/aws-sdk-go-v2"
76
- - " github.com/rs/zerolog"
77
- - " github.com/jedib0t/go-pretty/v6/table"
78
- deny :
79
- - pkg : " github.com/backup-blob/zfs-backup-blob/internal/repository"
80
- desc : not allowed
81
- - pkg : " github.com/backup-blob/zfs-backup-blob/internal/usecase"
82
- desc : not allowed
83
- pkg :
84
- list-mode : strict
85
- files :
86
- - " **/pkg/**/*.go"
87
- - " **/pkg/*.go"
88
- allow :
89
- - $all
90
- - $gostd
91
- - " github.com/fujiwara/shapeio"
92
- - " github.com/docker/go-units"
93
- deny :
94
- - pkg : " github.com/backup-blob/zfs-backup-blob/internal"
95
- desc : not allowed
96
-
1
+ version : " 2"
2
+ run :
3
+ issues-exit-code : 1
4
+ tests : false
97
5
linters :
98
- disable-all : true
6
+ default : none
99
7
enable :
100
- - wsl
101
- - govet
102
- - whitespace
103
- - varnamelen
104
- - unparam
105
- - unconvert
106
- - testpackage
107
- - tenv
108
- - nolintlint
109
- - nestif
110
- - nilerr
111
- - maintidx
112
- - gosec
113
- - mnd
114
- - goconst
115
- - gocritic
116
- - godot
117
8
- bodyclose
118
9
- containedctx
10
+ - cyclop
119
11
- depguard
120
12
- dupl
121
13
- durationcheck
122
14
- errname
123
15
- forcetypeassert
124
- - cyclop
125
- run :
126
- issues-exit-code : 1
127
- tests : false
128
-
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$
129
147
issues :
130
148
max-same-issues : 0
131
- exclude-files :
132
- - " .*_test.go$"
133
- - " pkg/fakemiddleware/fakemiddleware.go$"
134
- exclude-dirs :
135
- - " docs"
136
- exclude-rules :
137
- - linters :
138
- - mnd
139
- text : " Magic number: 2, in <condition> detected"
140
-
141
- output :
142
- show-stats : true
149
+ formatters :
150
+ exclusions :
151
+ generated : lax
152
+ paths :
153
+ - third_party$
154
+ - builtin$
155
+ - examples$
0 commit comments