-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.golangci.yml
80 lines (58 loc) · 1.87 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
linters:
enable:
# Drop-in replacement of `golint`.
- revive
# Forces to put `.` at the end of the comment. Code is poetry.
- godot
# Fix all the misspells, amazing thing.
- misspell
# Might not be that important but I prefer to keep all of them.
# `gofumpt` is amazing, kudos to Daniel Marti https://github.com/mvdan/gofumpt
- gofmt
- gofumpt
- goimports
# Forces comment why another check is disabled.
- nolintlint
# Remove unnecessary type conversions.
- unconvert
# Reports unused function parameters.
- unparam
# Detect the possibility to use variables/constants from stdlib.
- usestdlibvars
# Checks whether HTTP response body is closed successfully.
- bodyclose
# Checks `Err-` prefix for var and `-Error` suffix for error type.
- errname
# Suggests to use `%w` for error-wrapping.
- errorlint
# Forces to not skip error check.
- errcheck
# Check struct tags.
- tagliatelle
# Finds slices that could potentially be pre-allocated.
# Small performance win + cleaner code.
- prealloc
# Linter that specializes in simplifying code.
- gosimple
# Official Go tool. Must have.
- govet
# Finds naked/bare returns and requires change them.
- nakedret
# Finds the code that returns nil even if it checks that
# the error is not nil.
- nilerr
# Checks that there is no simultaneous return of nil error
# and an invalid value.
- nilnil
# Finds shadowing of Go's predeclared identifiers.
- predeclared
# Finds wasted assignment statements.
- wastedassign
# Detects when assignments to existing variables are not used
# Last week I caught a bug with it.
- ineffassign
# Test-related checks. All of them are good.
# - tenv
# - testableexamples
# - thelper
# - tparallel