-
Notifications
You must be signed in to change notification settings - Fork 118
/
.golangci.yml
63 lines (59 loc) · 2.04 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
linters:
enable-all: true
disable:
# We use long functions
- funlen
# We use globals in the code base
- gochecknoglobals
# gocognit complains about having large functions
- gocognit
# goconst complains about common strings
- goconst
# gocritic complains about needing to make case statements
- gocritic
# gocyclo complains about having large functions
- gocyclo
# We do not use conventional Golang comments
- godot
# goerr113 complains about creating new static errors
- goerr113
# gofmt is not needed because we are running goimports (which is a superset of gofmt)
- gofmt
# gofumpt is closed on the following issue:
# https://github.com/mvdan/gofumpt/issues/96
- gofumpt
# gomnd complains about magic numbers
- gomnd
# We manage long lines manually
- lll
# We do not care about making structs take less memory
- maligned
# nestif complains about some harmless nested if statements
- nestif
# nlreturn requires about excessive newlines around return statements
- nlreturn
# We do not need to use contexts in certain situations
- noctx
# We use some unused parameters for command function uniformity
- unparam
# We do not need to wrap all error messages
- wrapcheck
# wsl requires excessive newlines around if statements
- wsl
# Temp
- deadcode
- unused
issues:
# We want to use golint but we do not care about some of the things that it complains about
exclude:
# We have many exported functions without comments
- "exported \\w+ (\\S*['.]*)([a-zA-Z'.*]*) should have comment or be unexported"
# We block-scope variables in many places, making it impossible to outdent
- "if block ends with a return statement, so drop this else and outdent its block"
linters-settings:
govet:
# Checking for shadowed variables is experimental and disabled by default
check-shadowing: true
whitespace:
# Enforce newlines (or comments) after every multi-line if statement
multi-if: true