1
1
linters-settings :
2
- depguard :
3
- list-type : blacklist
4
- dupl :
5
- threshold : 100
6
2
funlen :
7
- lines : 100
3
+ lines : 150
8
4
statements : 50
9
- goconst :
10
- min-len : 2
11
- min-occurrences : 2
12
5
gocritic :
13
6
enabled-tags :
14
7
- diagnostic
@@ -17,95 +10,88 @@ linters-settings:
17
10
- performance
18
11
- style
19
12
disabled-checks :
20
- - dupImport # https://github.com/go-critic/go-critic/issues/845
21
- - ifElseChain
22
- - octalLiteral
23
13
- whyNoLint
24
- - wrapperFunc
25
14
gocyclo :
26
15
min-complexity : 15
27
- goimports :
28
- local-prefixes : github.com/golangci/golangci-lint
29
- gomnd :
30
- settings :
31
- mnd :
32
- # don't include the "operation" and "assign"
33
- checks : argument,case,condition,return
34
- govet :
35
- check-shadowing : true
36
- settings :
37
- printf :
38
- funcs :
39
- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
40
- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
41
- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
42
- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
43
16
lll :
44
17
line-length : 100
18
+ tab-width : 4
45
19
stylecheck :
46
20
checks :
47
21
- " -ST1000"
48
- misspell :
49
- locale : US
50
- nolintlint :
51
- allow-leading-space : true # don't require machine-readable nolint directives (i.e. with no leading space)
52
- allow-unused : false # report any unused nolint directives
53
- require-explanation : false # don't require an explanation for nolint directives
54
- require-specific : false # don't require nolint directives to be specific about which linter is being skipped
55
- revive :
56
- rules :
57
- - name : exported
22
+
58
23
linters :
59
24
enable :
60
- - nlreturn
61
- - forbidigo
62
- - gofumpt
25
+ - asciicheck
63
26
- bodyclose
27
+ - decorder
64
28
- depguard
65
29
- dogsled
66
30
- dupl
31
+ - dupword
32
+ - durationcheck
67
33
- errcheck
34
+ - errchkjson
35
+ - errname
36
+ - errorlint
68
37
- exhaustive
38
+ - exportloopref
39
+ - forbidigo
40
+ - forcetypeassert
69
41
- funlen
42
+ - gocheckcompilerdirectives
43
+ - gochecknoglobals
70
44
- gochecknoinits
45
+ - gocognit
71
46
- goconst
72
47
- gocritic
73
48
- gocyclo
49
+ - godot
50
+ - godox
51
+ - goerr113
74
52
- gofmt
53
+ - gofumpt
75
54
- goimports
76
55
- gomnd
77
56
- goprintffuncname
78
57
- gosec
79
58
- gosimple
80
59
- govet
60
+ - grouper
61
+ - importas
81
62
- ineffassign
82
63
- lll
64
+ - maintidx
65
+ - makezero
83
66
- misspell
84
67
- nakedret
68
+ - nestif
69
+ - nilerr
70
+ - nlreturn
85
71
- noctx
86
72
- nolintlint
73
+ - nolintlint
74
+ - prealloc
75
+ - predeclared
76
+ - reassign
87
77
- revive
88
- - rowserrcheck
89
- - exportloopref
90
78
- staticcheck
91
79
- stylecheck
80
+ - tenv
81
+ - testpackage
82
+ - tparallel
92
83
- typecheck
93
84
- unconvert
94
85
- unparam
95
86
- unused
87
+ - usestdlibvars
88
+ - wastedassign
96
89
- whitespace
97
- - asciicheck
98
- - gochecknoglobals
99
- - gocognit
100
- - godot
101
- - godox
102
- - goerr113
103
- - nestif
104
- - prealloc
105
- - testpackage
106
90
- wsl
107
91
108
92
issues :
93
+ max-issues-per-linter : 0
94
+ max-same-issues : 0
109
95
# https://github.com/golangci/golangci-lint/issues/2439#issuecomment-1002912465
110
96
exclude-use-default : false
111
97
exclude-rules :
@@ -116,20 +102,24 @@ issues:
116
102
- structcheck
117
103
- unused
118
104
- unparam
105
+
119
106
# ignoring long lines due to json/yaml tags in platform
120
107
- path : platform/definition.go
121
108
linters :
122
109
- lll
123
110
111
+ # ignore package comments complaints in revive
112
+ - linters :
113
+ - revive
114
+ text : " package-comments"
115
+
124
116
run :
125
- # running w/ 1.17 because we dont actually need/use 1.18 things and 1.18 breaks some linters.
126
- go : ' 1.17'
117
+ go : ' 1.19'
127
118
skip-dirs :
128
119
- private
129
120
130
- # golangci.com configuration
131
- # https://github.com/golangci/golangci/wiki/Configuration
121
+ output :
122
+ uniq-by-line : false
123
+
132
124
service :
133
- golangci-lint-version : 1.49.x # use the fixed version to not introduce new linters unexpectedly
134
- prepare :
135
- - echo "here I can run custom commands, but no preparation needed for this repo"
125
+ golangci-lint-version : 1.52.x
0 commit comments