-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yaml
64 lines (58 loc) · 1.33 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
53
54
55
56
57
58
59
60
61
62
63
64
run:
concurrency: 4
timeout: 5m
issues-exit-code: 2
tests: false
skip-dirs:
- pkg/status
- .go
- .git
output:
print-issued-lines: false
print-linter-name: true
uniq-by-line: false
path-prefix: ""
sort-results: true
linters:
disable-all: true
enable:
# bugs/error
- staticcheck
- revive
- govet
- errcheck
- gosec
- dupl
# performance
- gocritic
- prealloc
# style, formatting
- stylecheck
- goconst
- gofmt
- tagliatelle
linters-settings:
errcheck:
# Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
# Such cases aren't reported by default.
# Default: false
check-type-assertions: true
gofmt:
# Apply the rewrite rules to the source before reformatting.
# https://pkg.go.dev/cmd/gofmt
# Default: []
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'
- pattern: 'a[b:len(a)]'
replacement: 'a[b:]'
dupl:
# Tokens count to trigger issue, Default: 150
threshold: 100
tagliatelle:
case:
use-field-name: true
rules:
# Any struct tag type can be used.
# Support string case: `camel`, `pascal`, `kebab`, `snake`, `upperSnake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`, `header`.
yaml: snake