@@ -3,32 +3,70 @@ package config
3
3
import "github.com/pkg/errors"
4
4
5
5
var defaultLintersSettings = LintersSettings {
6
+ Dogsled : DogsledSettings {
7
+ MaxBlankIdentifiers : 2 ,
8
+ },
9
+ ErrorLint : ErrorLintSettings {
10
+ Errorf : true ,
11
+ Asserts : true ,
12
+ Comparison : true ,
13
+ },
14
+ Exhaustive : ExhaustiveSettings {
15
+ CheckGenerated : false ,
16
+ DefaultSignifiesExhaustive : false ,
17
+ IgnoreEnumMembers : "" ,
18
+ CheckingStrategy : "value" ,
19
+ },
20
+ Forbidigo : ForbidigoSettings {
21
+ ExcludeGodocExamples : true ,
22
+ },
23
+ Gocognit : GocognitSettings {
24
+ MinComplexity : 30 ,
25
+ },
26
+ Gocritic : GocriticSettings {
27
+ SettingsPerCheck : map [string ]GocriticCheckSettings {},
28
+ },
29
+ Godox : GodoxSettings {
30
+ Keywords : []string {},
31
+ },
32
+ Gofumpt : GofumptSettings {
33
+ LangVersion : "" ,
34
+ ExtraRules : false ,
35
+ },
36
+ Ifshort : IfshortSettings {
37
+ MaxDeclLines : 1 ,
38
+ MaxDeclChars : 30 ,
39
+ },
6
40
Lll : LllSettings {
7
41
LineLength : 120 ,
8
42
TabWidth : 1 ,
9
43
},
10
- Unparam : UnparamSettings {
11
- Algo : "cha" ,
12
- },
13
44
Nakedret : NakedretSettings {
14
45
MaxFuncLines : 30 ,
15
46
},
47
+ Nestif : NestifSettings {
48
+ MinComplexity : 5 ,
49
+ },
50
+ NoLintLint : NoLintLintSettings {
51
+ RequireExplanation : false ,
52
+ AllowLeadingSpace : true ,
53
+ RequireSpecific : false ,
54
+ AllowUnused : false ,
55
+ },
16
56
Prealloc : PreallocSettings {
17
57
Simple : true ,
18
58
RangeLoops : true ,
19
59
ForLoops : false ,
20
60
},
21
- Gocritic : GocriticSettings {
22
- SettingsPerCheck : map [string ]GocriticCheckSettings {},
23
- },
24
- Godox : GodoxSettings {
25
- Keywords : []string {},
61
+ Predeclared : PredeclaredSettings {
62
+ Ignore : "" ,
63
+ Qualified : false ,
26
64
},
27
- Dogsled : DogsledSettings {
28
- MaxBlankIdentifiers : 2 ,
65
+ Testpackage : TestpackageSettings {
66
+ SkipRegexp : `(export|internal)_test\.go` ,
29
67
},
30
- Gocognit : GocognitSettings {
31
- MinComplexity : 30 ,
68
+ Unparam : UnparamSettings {
69
+ Algo : "cha" ,
32
70
},
33
71
WSL : WSLSettings {
34
72
StrictAppend : true ,
@@ -42,44 +80,6 @@ var defaultLintersSettings = LintersSettings{
42
80
ForceExclusiveShortDeclarations : false ,
43
81
ForceCaseTrailingWhitespaceLimit : 0 ,
44
82
},
45
- NoLintLint : NoLintLintSettings {
46
- RequireExplanation : false ,
47
- AllowLeadingSpace : true ,
48
- RequireSpecific : false ,
49
- AllowUnused : false ,
50
- },
51
- Testpackage : TestpackageSettings {
52
- SkipRegexp : `(export|internal)_test\.go` ,
53
- },
54
- Nestif : NestifSettings {
55
- MinComplexity : 5 ,
56
- },
57
- Exhaustive : ExhaustiveSettings {
58
- CheckGenerated : false ,
59
- DefaultSignifiesExhaustive : false ,
60
- IgnoreEnumMembers : "" ,
61
- CheckingStrategy : "value" ,
62
- },
63
- Gofumpt : GofumptSettings {
64
- LangVersion : "" ,
65
- ExtraRules : false ,
66
- },
67
- ErrorLint : ErrorLintSettings {
68
- Errorf : true ,
69
- Asserts : true ,
70
- Comparison : true ,
71
- },
72
- Ifshort : IfshortSettings {
73
- MaxDeclLines : 1 ,
74
- MaxDeclChars : 30 ,
75
- },
76
- Predeclared : PredeclaredSettings {
77
- Ignore : "" ,
78
- Qualified : false ,
79
- },
80
- Forbidigo : ForbidigoSettings {
81
- ExcludeGodocExamples : true ,
82
- },
83
83
}
84
84
85
85
type LintersSettings struct {
@@ -114,8 +114,8 @@ type LintersSettings struct {
114
114
Gosimple StaticCheckSettings
115
115
Govet GovetSettings
116
116
Ifshort IfshortSettings
117
- Ireturn IreturnSettings
118
117
ImportAs ImportAsSettings
118
+ Ireturn IreturnSettings
119
119
Lll LllSettings
120
120
Makezero MakezeroSettings
121
121
Maligned MalignedSettings
@@ -134,9 +134,9 @@ type LintersSettings struct {
134
134
Structcheck StructCheckSettings
135
135
Stylecheck StaticCheckSettings
136
136
Tagliatelle TagliatelleSettings
137
+ Tenv TenvSettings
137
138
Testpackage TestpackageSettings
138
139
Thelper ThelperSettings
139
- Tenv TenvSettings
140
140
Unparam UnparamSettings
141
141
Unused StaticCheckSettings
142
142
Varcheck VarCheckSettings
@@ -166,11 +166,6 @@ type Cyclop struct {
166
166
SkipTests bool `mapstructure:"skip-tests"`
167
167
}
168
168
169
- type ErrChkJSONSettings struct {
170
- CheckErrorFreeEncoding bool `mapstructure:"check-error-free-encoding"`
171
- ReportNoExported bool `mapstructure:"report-no-exported"`
172
- }
173
-
174
169
type DepGuardSettings struct {
175
170
ListType string `mapstructure:"list-type"`
176
171
Packages []string
@@ -196,6 +191,11 @@ type ErrcheckSettings struct {
196
191
Exclude string `mapstructure:"exclude"`
197
192
}
198
193
194
+ type ErrChkJSONSettings struct {
195
+ CheckErrorFreeEncoding bool `mapstructure:"check-error-free-encoding"`
196
+ ReportNoExported bool `mapstructure:"report-no-exported"`
197
+ }
198
+
199
199
type ErrorLintSettings struct {
200
200
Errorf bool `mapstructure:"errorf"`
201
201
Asserts bool `mapstructure:"asserts"`
@@ -216,11 +216,6 @@ type ExhaustiveStructSettings struct {
216
216
StructPatterns []string `mapstructure:"struct-patterns"`
217
217
}
218
218
219
- type IreturnSettings struct {
220
- Allow []string `mapstructure:"allow"`
221
- Reject []string `mapstructure:"reject"`
222
- }
223
-
224
219
type ForbidigoSettings struct {
225
220
Forbid []string `mapstructure:"forbid"`
226
221
ExcludeGodocExamples bool `mapstructure:"exclude-godoc-examples"`
@@ -366,6 +361,11 @@ type ImportAsAlias struct {
366
361
Alias string
367
362
}
368
363
364
+ type IreturnSettings struct {
365
+ Allow []string `mapstructure:"allow"`
366
+ Reject []string `mapstructure:"reject"`
367
+ }
368
+
369
369
type LllSettings struct {
370
370
LineLength int `mapstructure:"line-length"`
371
371
TabWidth int `mapstructure:"tab-width"`
0 commit comments