forked from scribble-rs/scribble.rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
78 lines (72 loc) · 2 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
linters:
enable-all: true
disable:
## These are all deprecated
- golint
- ifshort
- exhaustivestruct
- deadcode
- nosnakecase
- varcheck
- interfacer
- maligned
- structcheck
- scopelint
## These are too strict for our taste
# Whitespace linter
- wsl
# Demands a newline before each return
- nlreturn
# Demands t.Parallel to be called in tests
- paralleltest
# Magic numbers
- gomnd
# Functionlength and linelength
- funlen
- lll
# testpackages must be named _test for reduced visibility to package
# details.
- testpackage
## Useful, but we won't use it for now, maybe later
# Allows us to define rules for dependencies
- depguard
# For some reason, imports aren't sorted right now.
- gci
# For now, we'll stick with our globals and inits. Everything needs to be
# rewrite to be more testable and safe to teardown and reset.
- gochecknoglobals
- gochecknoinits
# Seems to be very useful, but is also a very common usecase, so we'll
# ignore it for now
- exhaustruct
# Requires certain types of tags, such as json or mapstructure.
# While very useful, I don't care right now.
- musttag
- goerr113
linters-settings:
govet:
enable:
- fieldalignment
gocritic:
disabled-checks:
# This has false positives and provides little value.
- ifElseChain
run:
skip-files:
- ".*_easyjson.go"
issues:
exclude-rules:
# Exclude some linters from running on tests files. In tests, we often have
# code that is rather unsafe and only has one purpose, or furthermore things
# that indicate an issue in production, but are fine for testing only small
# units.
- path: _test\.go
linters:
- funlen
- cyclop
- forcetypeassert
- varnamelen
# The tools aren't part of the actual production code and therefore we don't
# care about codequality much right now.
- path: tools/
text: .+