-
Notifications
You must be signed in to change notification settings - Fork 186
/
.golangci.yml
95 lines (85 loc) · 2.31 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
linters:
enable-all: true
disable:
## These are deprecated
- execinquery
- exportloopref
- gomnd
## These are too strict for our taste
# Whitespace linter
- wsl
# Demands a newline before each return
- nlreturn
# Magic numbers
- mnd
# function, line and variable length
- funlen
- lll
- varnamelen
# testpackages must be named _test for reduced visibility to package
# details.
- testpackage
# I don't really care about cyclopmatic complexity
- cyclop
- gocognit
## 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
# Not wrapping errors
- err113
- wrapcheck
# Code duplications
- dupl
## Provides no real value
- testifylint
# Broken
- goimports
linters-settings:
govet:
disable:
- fieldalignment
gocritic:
disabled-checks:
# This has false positives and provides little value.
- ifElseChain
revive:
rules:
- name: var-naming
disabled: true
stylecheck:
checks: ["all", "-ST1003"]
run:
exclude-files:
- ".*_easyjson.go"
issues:
exclude-rules:
- path: translations\\[^e][^n].*?\.go
linters:
# Too many potential false positives
- misspell
# 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: .+