-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
86 lines (77 loc) · 2.19 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
81
82
83
84
85
86
run:
timeout: 10m
build-tags:
- "skip"
skip-dirs:
- pkg/fhir
- pkg/aidbox
- vendor
- __scripts__
skip-files:
- ".*\\.gen\\.go$"
linters:
enable:
- bodyclose
- misspell
# - revive
- asciicheck
- exhaustive
- godot
- gofumpt
- gosec
- stylecheck
- nakedret
- makezero
- nilerr
- unconvert
- forbidigo
- gocritic
linters-settings:
misspell:
locale: US
# ignore-words:
# - nefrosovet
# - oidc
forbidigo:
# Forbid the following identifiers (identifiers are written using regexp):
forbid:
- ^print.*$
- 'fmt\.Print.*'
gocritic:
# Which checks should be disabled; can't be combined with 'enabled-checks'; default is empty
disabled-checks:
- regexpMust
- hugeParam
# - rangeValCopy
# Enable multiple checks by tags, run `GL_DEBUG=gocritic golangci-lint run` to see all tags and checks.
# Empty list by default. See https://github.com/go-critic/go-critic#usage -> section "Tags".
enabled-tags:
- performance
disabled-tags:
- experimental
# Settings passed to gocritic.
# The settings key is the name of a supported gocritic checker.
# The list of supported checkers can be find in https://go-critic.github.io/overview.
settings:
captLocal: # must be valid enabled check name
# whether to restrict checker to params only (default true)
paramsOnly: true
elseif:
# whether to skip balanced if-else pairs (default true)
skipBalanced: true
# hugeParam:
# # size in bytes that makes the warning trigger (default 80)
# sizeThreshold: 80
rangeExprCopy:
# size in bytes that makes the warning trigger (default 512)
sizeThreshold: 512
# whether to check test functions (default true)
skipTestFuncs: true
rangeValCopy:
# size in bytes that makes the warning trigger (default 128)
sizeThreshold: 32
# whether to check test functions (default true)
skipTestFuncs: true
underef:
# whether to skip (*x).method() calls where x is a pointer receiver (default true)
skipRecvDeref: true