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,87 @@ 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
68
36
- exhaustive
37
+ - exportloopref
38
+ - forbidigo
39
+ - forcetypeassert
69
40
- funlen
41
+ - gocheckcompilerdirectives
42
+ - gochecknoglobals
70
43
- gochecknoinits
44
+ - gocognit
71
45
- goconst
72
46
- gocritic
73
47
- gocyclo
48
+ - godot
49
+ - godox
50
+ - goerr113
74
51
- gofmt
52
+ - gofumpt
75
53
- goimports
76
54
- gomnd
77
55
- goprintffuncname
78
56
- gosec
79
57
- gosimple
80
58
- govet
59
+ - grouper
60
+ - importas
81
61
- ineffassign
82
62
- lll
63
+ - maintidx
64
+ - makezero
83
65
- misspell
84
66
- nakedret
67
+ - nestif
68
+ - nilerr
69
+ - nlreturn
85
70
- noctx
86
71
- nolintlint
72
+ - nolintlint
73
+ - prealloc
74
+ - predeclared
75
+ - reassign
87
76
- revive
88
- - rowserrcheck
89
- - exportloopref
90
77
- staticcheck
91
78
- stylecheck
79
+ - tenv
80
+ - testpackage
81
+ - tparallel
92
82
- typecheck
93
83
- unconvert
94
84
- unparam
95
85
- unused
86
+ - usestdlibvars
87
+ - wastedassign
96
88
- whitespace
97
- - asciicheck
98
- - gochecknoglobals
99
- - gocognit
100
- - godot
101
- - godox
102
- - goerr113
103
- - nestif
104
- - prealloc
105
- - testpackage
106
89
- wsl
107
90
108
91
issues :
92
+ max-issues-per-linter : 0
93
+ max-same-issues : 0
109
94
# https://github.com/golangci/golangci-lint/issues/2439#issuecomment-1002912465
110
95
exclude-use-default : false
111
96
exclude-rules :
@@ -116,20 +101,24 @@ issues:
116
101
- structcheck
117
102
- unused
118
103
- unparam
104
+
119
105
# ignoring long lines due to json/yaml tags in platform
120
106
- path : platform/definition.go
121
107
linters :
122
108
- lll
123
109
110
+ # ignore package comments complaints in revive
111
+ - linters :
112
+ - revive
113
+ text : " package-comments"
114
+
124
115
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'
116
+ go : ' 1.19'
127
117
skip-dirs :
128
118
- private
129
119
130
- # golangci.com configuration
131
- # https://github.com/golangci/golangci/wiki/Configuration
120
+ output :
121
+ uniq-by-line : false
122
+
132
123
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"
124
+ golangci-lint-version : 1.52.x
0 commit comments