-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
52 lines (47 loc) · 1.54 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
run:
timeout: 2m
# Do not change go.{mod,sum}.
modules-download-mode: readonly
linters:
enable-all: true
disable:
# Disabled as a style choice:
- wrapcheck # We do not rewrap all errors from other packages.
- varnamelen # We often use single letter arguments.
- exhaustivestruct # We often have uninitialized fields of structs.
- errorlint # We have interface errors which an impl needs to return.
- lll # We use long lines.
- gochecknoglobals # We have a lot of globals.
- nlreturn # "new line before return"; not useful.
- paralleltest # We like parallel tests.
- ireturn # We often return interfaces.
- wsl # Formatting disabled for now.
- gochecknoinits # We use init functions.
- gci # We have our own import order.
# Deprecated:
- maligned
- scopelint
- golint
- interfacer
linters-settings:
cyclop:
# 15 is used by go-report-card as well.
max-complexity: 15
goheader:
template-path: ".scripts/copyright-notice"
issues:
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0
exclude-rules:
- path: _test.go
linters:
# We often have long test or test helper functions.
- funlen
# Magic numbers and constants are ok in test.
- gomnd
# Can use panicing interface casts.
- forcetypeassert
# Can create dynamic errors with errors.New.
- goerr113