-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.golangci.yml
More file actions
94 lines (94 loc) · 2.12 KB
/
Copy path.golangci.yml
File metadata and controls
94 lines (94 loc) · 2.12 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
version: "2"
run:
# Without these, every file behind a build tag is silently skipped, so tagged tests go unlinted.
# `unit` is deliberately absent: it disables the testcontainer files rather than enabling any, so
# setting it would hide their callers and report the functions they use as unused.
build-tags:
- e2e
- viper_bind_struct
linters:
settings:
gocritic:
settings:
ifElseChain:
minThreshold: 5
goheader:
values:
regexp:
AUTHOR: .*
AYEAR: 20[0-9]{2}
ws: "[ \t]*"
template-path: ./.preamble.txt
maintidx:
under: 30
mnd:
ignored-numbers:
- "0600"
- "0666"
- "0700"
- "42"
- "2"
- "1"
- "180"
- "90"
- "60"
- "360"
- "255"
- "2.0"
revive:
rules:
- name: call-to-gc
- name: confusing-naming
- name: constant-logical-expr
- name: context-as-argument
- name: context-keys-type
- name: deep-exit
- name: defer
- name: dot-imports
- name: duplicated-imports
- name: empty-block
- name: errorf
- name: exported
arguments:
- disableStutteringCheck
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
- name: string-of-int
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: unused-parameter
- name: var-declaration
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- dupl
- mnd
- noctx
path: (.+)_test.go
- linters:
- mnd
path: config.go
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$