-
Notifications
You must be signed in to change notification settings - Fork 5
/
.golangci.yml
103 lines (94 loc) · 2.25 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
run:
# default concurrency is a available CPU number
concurrency: 4
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 30m
# exit code when at least one issue was found, default is 1
issues-exit-code: 1
# include test files or not, default is true
tests: true
issues:
# Which files to exclude: they will be analyzed, but issues from them won't be reported.
# 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.
# Default: []
exclude-files:
- ".*\\_gen\\.go$"
output:
# The formats used to render issues.
# Formats:
# - `colored-line-number`
# - `line-number`
# - `json`
# - `colored-tab`
# - `tab`
# - `html`
# - `checkstyle`
# - `code-climate`
# - `junit-xml`
# - `github-actions`
# - `teamcity`
# - `sarif`
# Output path can be either `stdout`, `stderr` or path to the file to write to.
#
# Default:
# formats:
# - format: colored-line-number
# path: stdout
formats:
- format: colored-line-number
# Print lines of code with issue.
# Default: true
print-issued-lines: true
# Print linter name in the end of issue text.
# Default: true
print-linter-name: true
linters-settings:
gocognit:
min-complexity: 50
gocritic:
# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint` run to see all tags and checks.
# Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
enabled-checks:
- appendCombine
- boolExprSimplify
- emptyFallthrough
- emptyStringTest
- equalFold
- hexLiteral
- indexAlloc
- nilValReturn
- yodaStyleExpr
linters:
enable-all: false
disable-all: true
enable:
- asciicheck
- bidichk
- bodyclose
- bodyclose
- containedctx
- contextcheck
- decorder
- dogsled
- dupl
- errname
- gocognit
- goconst
- gocritic
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- makezero
- nilerr
- predeclared
- staticcheck
- tenv
- typecheck
- unconvert
- unparam
- unused