-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.golangci.yml
77 lines (70 loc) · 1.52 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
# full list: https://golangci-lint.run/usage/linters/
linters:
disable-all: true
enable:
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
- bodyclose
- contextcheck
- decorder
- dupl
- goconst
- gocritic
- gofmt
- goimports
- gosec
- noctx
- nolintlint
- prealloc
- revive
- stylecheck
- unconvert
- usestdlibvars
# full list: https://golangci-lint.run/usage/configuration/
linters-settings:
staticcheck:
checks: [ "all" ]
stylecheck:
# ignore package comment and naming recommendations
checks: [ "all", "-ST1000", "-ST1003", "-ST10016"]
errcheck:
check-blank: true
govet:
shadow: true
dupl:
threshold: 500
issues:
new: true
new-from-rev: develop
# Validates whole file instead of changed lines only, but produces many errors
# on large files. We might consider enabling this flag to start improving the
# source code file by file. Also, with `whole-files` turned off validators don't
# check unchanged lines, even if the change leaded to an issue in other place.
whole-files: false
exclude-rules:
- path: _test\.go
linters:
- errcheck
- gosec
- govet
- gomnd
- bodyclose
- ineffassign
include:
- EXC0011
- EXC0012
- EXC0014
run:
go: "1.23"
allow-parallel-runners: true
exclude-files:
- ".*\\.pb\\.go$" # skip protobuf generated code
output:
formats:
- format: tab
path: stderr