-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
136 lines (130 loc) · 3.24 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# options for analysis running
run:
# default concurrency is a available CPU number
concurrency: 4
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 30s
# all available settings of specific linters
linters-settings:
golint:
# minimal confidence for issues, default is 0.8
min-confidence: 0
lll:
line-length: 140
depguard:
list-type: blacklist
packages:
- github.com/pkg/errors
packages-with-error-message:
- github.com/pkg/errors: "replace github.com/pkg/errors with GO 1.13+ fmt.Errorf"
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
misspell:
locale: US
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
min-complexity: 10
linters:
disable-all: true
fast: false
enable:
# List of enabled-by-default linters that we explicitly opt-in.
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
# List of disabled-by-default linters that we explicitly opt-in.
- asciicheck
- bodyclose
- cyclop
# - depguard
- dogsled
- dupl
- durationcheck
- errorlint
- exhaustive
# - exhaustivestruct -> This linter is meant to be used only for special cases. It is not recommended to use it for all files in a project.
- exportloopref
- forbidigo
- forcetypeassert
- funlen
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- godox
- goerr113
- gofmt
- gofumpt
- goheader
- goimports
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
# - gosec
- importas
- lll
- makezero
- misspell
- nakedret
- nestif
- nilerr
- nlreturn
- noctx
- nolintlint
- prealloc
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
- stylecheck
- tagliatelle
- thelper
- tparallel
- unconvert
- unparam
- wastedassign
- whitespace
# - wrapcheck
- wsl
# deprecated linters
# - golint Replaced by revive
# - interfacer
# - maligned Replaced by govet 'fieldalignment'
# - scopelint Replaced by exportloopref
# - ifshort
# - structcheck Replaced by unused.
# - deadcode Replaced by unused.
# - varcheck Replaced by unused.
issues:
# Independently from option `exclude` we use default exclude patterns,
# it can be disabled by this option. To list all
# excluded by default patterns execute `golangci-lint run --help`.
# Default value for this option is true.
exclude-use-default: false
# List of regexps of issue texts to exclude, empty list by default.
# But independently from this option we use default exclude patterns,
# it can be disabled by `exclude-use-default: false`. To list all
# excluded by default patterns execute `golangci-lint run --help`
exclude:
- Using the variable on range scope `tt` in function literal
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- funlen
service:
golangci-lint-version: 1.41.1