forked from Mirantis/hmc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
145 lines (143 loc) · 3.08 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
run:
timeout: 5m
allow-parallel-runners: true
issues:
# don't skip warning about doc comments
# don't exclude the default set of lint
exclude-use-default: false
# restore some of the defaults
# (fill in the rest as needed)
exclude-rules:
- path: "internal/*"
linters:
- dupl
- text: "struct-tag: unknown option 'inline' in JSON tag"
linters:
- revive
- text: "Unhandled error in call to function fmt.Print*"
linters:
- revive
- path: cmd/main.go
linters:
- maintidx
- path: test/
linters:
- perfsprint
linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- canonicalheader
- containedctx
- contextcheck
- copyloopvar
- decorder
- dogsled
- dupl
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- forbidigo
- forcetypeassert
- gci
- ginkgolinter
- gocheckcompilerdirectives
- gochecksumtype
- goconst
- gocritic
- gocyclo
- gofmt
- gofumpt
- goimports
- goprintffuncname
- gosimple
- govet
- ineffassign
- interfacebloat
- intrange
- loggercheck
- maintidx
- misspell
- musttag
- nakedret
- nilerr
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- paralleltest
- perfsprint
- prealloc
- predeclared
- promlinter
- revive
- staticcheck
- stylecheck
- tenv
- testifylint
- thelper
- tparallel
- unconvert
- unparam
- unused
- usestdlibvars
- wastedassign
- whitespace
linters-settings:
dupl:
# Tokens count to trigger issue.
# Default: 150
threshold: 200
gci:
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/Mirantis/hmc) # Custom section: groups all imports with the specified Prefix.
skip-generated: false
gofmt:
# Apply the rewrite rules to the source before reformatting.
# https://pkg.go.dev/cmd/gofmt
# Default: []
rewrite-rules:
- pattern: "interface{}"
replacement: "any"
gofumpt:
extra-rules: true
govet:
enable-all: true
disable:
- fieldalignment
- shadow
loggercheck:
kitlog: false
klog: false
require-string-key: true
no-printf-like: true
paralleltest:
ignore-missing: true
revive:
enable-all-rules: true
rules:
- name: add-constant
disabled: true
- name: cognitive-complexity
disabled: true
- name: cyclomatic
disabled: true
- name: dot-imports
disabled: true
- name: exported
disabled: true
- name: function-length
disabled: true
- name: max-public-structs
disabled: true # the api/* pkgs have lots of structs
- name: line-length-limit
disabled: true
- name: package-comments
disabled: true
stylecheck:
checks: ["all", "-ST1000", "-ST1001", "-ST1021"]