-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.golangci.yaml
More file actions
128 lines (126 loc) · 2.97 KB
/
.golangci.yaml
File metadata and controls
128 lines (126 loc) · 2.97 KB
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
version: "2"
run:
timeout: 15m
linters:
default: none
enable:
- asciicheck
- bodyclose
- copyloopvar
# - depguard
- dogsled
- durationcheck
- errcheck
- gochecknoinits
- gocritic
- goprintffuncname
- govet
- ineffassign
- misspell
- musttag
- nolintlint
- nonamedreturns
- prealloc
- revive
- sloglint
- staticcheck
- unconvert
- unparam
- unused
- usestdlibvars
- whitespace
settings:
errcheck:
exclude-functions:
- fmt:.*[rR]ead|[wW]rite|[cC]lose
- io:Copy
nonamedreturns:
report-error-in-defer: false
sloglint:
no-mixed-args: true
# Enforce using key-value pairs only (overrides no-mixed-args, incompatible with attr-only).
kv-only: false
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
attr-only: false
# Enforce not using global loggers.
no-global: ""
# Enforce using methods that accept a context.
context: ""
# Enforce using static values for log messages.
static-msg: false
# Enforce using constants instead of raw keys.
no-raw-keys: false
# Enforce a single key naming convention.
key-naming-case: "snake"
# Enforce not using specific keys.
forbidden-keys:
- level
- msg
- logger
- source
- stacktrace
- time
# Enforce putting arguments on separate lines.
args-on-sep-lines: false
revive:
rules:
- name: var-naming
severity: warning
disabled: false
exclude: [""]
arguments:
- ["ID"] # AllowList
- ["VM"] # DenyList
- - skip-initialism-name-checks: false
upper-case-const: false
skip-package-name-checks: true
skip-package-name-collision-with-go-std: false
extra-bad-package-names: []
staticcheck:
checks:
- all
- '-QF1008' # not need to fix; we understand how to call nested structs
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- path: (.+)\.go$
text: ST1005.*
- path: (.+)\.go$
text: should not use dot imports
- path: (.+)\.go$
text: don't use an underscore in package name
- path: (.+)\.go$
text: 'exported: .*'
paths:
- third_party$
- builtin$
- examples$
- _test\.go$
- deepcopy\.go$
formatters:
enable:
- gci
- gofmt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/deckhouse/)
- prefix(github.com/deckhouse/deckhouse-cli)
- localmodule
goimports:
local-prefixes:
- github.com/deckhouse/
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$