-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.golangci.yaml
More file actions
110 lines (109 loc) · 2.77 KB
/
.golangci.yaml
File metadata and controls
110 lines (109 loc) · 2.77 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
version: "2"
run:
timeout: 10m
linters:
default: none
enable:
- copyloopvar
- dogsled
- errcheck
- gocritic
- govet
- ineffassign
- misspell
- musttag
- nonamedreturns
- prealloc
- revive
- sloglint
- staticcheck
- unconvert
- unparam
- whitespace
- unused
- usestdlibvars
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
staticcheck:
checks:
- all
- '-ST1003' # waiting for package name will be fixed (underscores)
- '-QF1008' # not need to fix; we understand how to call nested structs
revive:
rules:
- name: var-naming # waiting for package name will be fixed (incorrect 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: []
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:
- validation/
formatters:
enable:
- gci
- gofmt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/deckhouse/lib-dhctl)
- localmodule
goimports:
local-prefixes:
- github.com/deckhouse/lib-dhctl