-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy path.golangci.yml
More file actions
89 lines (89 loc) · 2.36 KB
/
.golangci.yml
File metadata and controls
89 lines (89 loc) · 2.36 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
formatters:
enable:
- gofumpt
- goimports
settings:
goimports:
local-prefixes:
- github.com/prometheus/test-infra
issues:
max-issues-per-linter: 0
max-same-issues: 0
linters:
enable:
- errorlint
- gomodguard
- misspell
- revive
- whitespace
exclusions:
generated: strict
paths:
# Skip autogenerated files.
- ^.*\.(pb|y)\.go$
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
warn-unused: true
settings:
gomodguard:
blocked:
modules:
- github.com/pkg/errors:
recommendations:
- errors
- fmt
revive:
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
- name: blank-imports
disabled: true
- name: comment-spacings
- name: context-as-argument
arguments:
# Allow functions with test or bench signatures.
- allowTypesBefore: '*testing.T,testing.TB'
- name: context-keys-type
- name: dot-imports
- name: early-return
arguments:
- preserveScope
# A lot of false positives: incorrectly identifies channel draining as "empty code block".
# See https://github.com/mgechev/revive/issues/386
- name: empty-block
disabled: true
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: increment-decrement
- name: indent-error-flow
arguments:
- preserveScope
- name: package-comments
# TODO(beorn7): Currently, we have a lot of missing package doc comments. Maybe we should have them.
disabled: true
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
arguments:
- preserveScope
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: unused-parameter
- name: var-declaration
- name: var-naming
disabled: true
staticcheck:
checks:
- all
- -ST1003 # FIXME: Poorly chosen identifier
- -ST1005 # FIXME: Incorrectly formatted error string
run:
timeout: 5m
version: "2"