-
Notifications
You must be signed in to change notification settings - Fork 138
/
.golangci.yaml
70 lines (70 loc) · 2.35 KB
/
.golangci.yaml
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
# Options for analysis running.
run:
# Timeout for analysis, e.g. 30s, 5m.
# Default: 1m
timeout: 3m
# Which dirs to skip: issues from them won't be reported.
# Can use regexp here: `generated.*`, regexp is applied on full path.
# Default value is empty list,
# but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work on Windows.
skip-dirs:
# - src/external_libs
# - autogenerated_by_my_lib
# Enables skipping of directories:
# - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
# Default: true
skip-dirs-use-default: true
# Which files to skip: they will be analyzed, but issues from them won't be reported.
# Default value is empty list,
# but there is no need to include all autogenerated files,
# we confidently recognize autogenerated files.
# If it's not please let us know.
# "/" will be replaced by current OS file path separator to properly work on Windows.
skip-files:
# - ".*\\.my\\.go$"
# - lib/bad.go
linters:
# Disable all linters.
# Default: false
disable-all: true
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default
enable:
- bidichk
- errname
- forbidigo
- gocritic
- gofmt
- govet
- misspell
- nolintlint
- tenv
- unconvert
- unused
- whitespace
# Run only fast linters from enabled linters set (first run won't be fast)
# Default: false
fast: false
linters-settings:
forbidigo:
# Forbid fmt.Printf, as they are often used for debugging and they should
# not be commited. The good cases can be written fmt.Fprintf(os.Stdout, ).
forbid:
- fmt.Printf
gocritic:
disabled-checks:
- appendAssign
- ifElseChain
- argOrder
nolintlint:
# Disable to ensure that all nolint directives actually have an effect.
allow-unused: false
# Disable to ensure that nolint directives don't have a leading space.
allow-leading-space: false
# Exclude following linters from requiring an explanation.
allow-no-explanation: []
# Enable to require an explanation of nonzero length after each nolint directive.
require-explanation: true
# Enable to require nolint directives to mention the specific linter being suppressed.
require-specific: true