-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.golangci.yaml
52 lines (49 loc) · 1.5 KB
/
.golangci.yaml
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
run:
timeout: 30m
skip-files:
- "^zz_generated.*"
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
# check available linters @ https://golangci-lint.run/usage/linters/
linters:
enable: # please keep this alphabetized
# Don't use soon to deprecated[1] linters that lead to false
# https://github.com/golangci/golangci-lint/issues/1841
# - deadcode
# - gocyclo
# - loggercheck # requires [email protected]
# - structcheck
# - varcheck
- errcheck
- gocritic
- goconst
- goimports
- gofmt # We enable this as well as goimports for its simplify mode.
- gosimple
- govet
- ineffassign
- megacheck
- misspell
- nakedret
- staticcheck
- stylecheck
- typecheck
- unconvert
- unused
linters-settings:
errcheck:
check-blank: false # to keep `_ = viper.BindPFlag(...)` from throwing errors
staticcheck:
checks: [
"all",
"-ST1000", # ST1000 - Incorrect or missing package comment (non-default)
"-ST1003", # ST1003 – Poorly chosen identifier (non-default)
"-ST1016", # ST1016 – Use consistent method receiver names (non-default)
"-SA1019", # TODO(fix) Using a deprecated function, variable, constant or field
"-SA2002", # TODO(fix) Called testing.T.FailNow or SkipNow in a goroutine, which isn’t allowed
]
stylecheck:
checks: [
"ST1019", # Importing the same package multiple times.
]