-
-
Notifications
You must be signed in to change notification settings - Fork 293
/
Copy path.golangci.yml
87 lines (87 loc) · 2.04 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
version: "2"
linters:
enable:
- godot
- misspell
- revive
- whitespace
settings:
errcheck:
exclude-functions:
- (io.ReadCloser).Close
- (io.WriteCloser).Close
- (io.ReadWriteCloser).Close
- (*os.File).Close
- (*github.com/gorilla/websocket.Conn).Close
- (*github.com/mdlayher/vsock.Listener).Close
- os.Remove
- (*compress/gzip.Writer).Close
revive:
rules:
- name: exported
arguments:
- checkPrivateReceivers
- disableStutteringCheck
- name: import-shadowing
- name: unchecked-type-assertion
- name: var-naming
arguments:
- []
- []
- - upperCaseConst: true
- name: early-return
- name: redundant-import-alias
- name: redefines-builtin-id
- name: struct-tag
- name: receiver-naming
- name: deep-exit
- name: defer
- name: bool-literal-in-expr
- name: comment-spacings
- name: use-any
- name: bare-return
- name: empty-block
- name: range-val-address
- name: range-val-in-closure
- name: var-declaration
- name: useless-break
- name: error-naming
- name: indent-error-flow
- name: datarace
- name: modifies-value-receiver
- name: empty-lines
- name: duplicated-imports
- name: error-return
exclusions:
generated: lax
rules:
- linters:
- revive
source: '^//generate-database:mapper '
- linters:
- staticcheck
text: "ST1005:"
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofumpt
- goimports
settings:
gci:
sections:
- standard
- default
- prefix(github.com/lxc/incus)
goimports:
local-prefixes:
- github.com/lxc/incus
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$