This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
/
.golangci.yml
101 lines (99 loc) · 2.71 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
run:
tests: false
# # timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 5m
linters:
# Disable all linters.
# Default: false
disable-all: true
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default-linters
enable:
- asciicheck
- bidichk
- bodyclose
- contextcheck
# - cyclop
- deadcode
- depguard
# - dogsled <- disabled because we would like to participate in the iditerod
- dupl
- durationcheck
- errcheck
- errname
- errorlint
- exhaustive
# - exhaustivestruct <- disabled because we don't want to use every element of every struct
- exportloopref
# - forbidigo <- forbids fmt.Print* by default
- forcetypeassert
# - funlen <- some of our functions are longer than this by necessity
# - gci <- questionable utility
# - gochecknoglobals <- disabled because we want some globals
# - gochecknoinits <- disabled because we want to use init()
# - gocognit <- disabled for same reason as gocyclo
- goconst
- gocritic
# - gocyclo <- disabled because it won't work with how we cosmos
- godot
# - godox <- detects TODO/BUG/FIXME and we may wantnthis later but isn't appropriate now
# - goerr113 <- disabled due to lack of comprehension
- gofmt
- gofumpt
- goheader
- goimports
# - gomoddirectives <- disables replaces
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
# - ifshort <- seems to be of questionable value
- importas
- ineffassign
# - ireturn <- disabled because we want to return interfaces
# - lll <- disabled as it is a bit much. Maybe we have a desired limit?
- makezero
- misspell
- nakedret
# - nestif <- ?
- nilerr
- nilnil
# - nlreturn <- disabled as it doesn't auto-fix something simple and doesn't add anything useful
- noctx
# - nolintlint <- disabled because we use nolint in some places
- paralleltest
# - prealloc <- disabled because it makes simple code complicated
- predeclared
- promlinter
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
# - tagliatelle <- disabled for defying cosmos idiom
- tenv
- testpackage
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- varcheck
# - varnamelen <- disabled because defies idiom
# - wastedassign
- whitespace
# - wrapcheck
# - wsl
issues:
exclude-rules:
- path: bench_test\.go
linters:
- errcheck
- path: client/docs
linters:
- all
max-issues-per-linter: 10000
max-same-issues: 10000