-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy path.golangci.yml
More file actions
109 lines (108 loc) · 2.5 KB
/
Copy path.golangci.yml
File metadata and controls
109 lines (108 loc) · 2.5 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
version: "2"
run:
go: "1.23"
linters:
enable:
- dupl
- errcheck
- errorlint
- govet
- importas
- ineffassign
- misspell
- nilerr
- reassign
- revive
- staticcheck
- unconvert
- unparam
- unused
- usestdlibvars
- usetesting
- varnamelen
# - wrapcheck
settings:
errcheck:
exclude-functions:
# Dropped/canceled/timed out connections or bad clients make checking this
# error pointless 99% of the time.
- (net/http.ResponseWriter).Write
- (flag/*FlagSet).Parse
revive:
rules: # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
- name: package-comments
disabled: true
- name: exported
disabled: true
- name: atomic
- name: bare-return
- name: bool-literal-in-expr
- name: cognitive-complexity
arguments:
- 30
- name: datarace
- name: duplicated-imports
- name: early-return
- name: error-return
- name: error-strings
- name: if-return
- name: indent-error-flow
- name: range-val-address
- name: receiver-naming
- name: time-naming
- name: var-naming
arguments:
- [] # AllowList
- [] # DenyList
- - skip-package-name-checks: true
- name: unreachable-code
varnamelen:
max-distance: 40
ignore-decls:
- c echo.Context
- const C
- db database.Db
- db db
- e error
- e watch.Event
- f *foo.Bar
- i int
- id string
- id any
- m map[string]any
- m map[string]int
- mc api.CliServiceClient
- ns *komponents.Namespace
- ns komponents.Namespace
- ns string
- r *http.Request
- T any
- t testing.T
- vc *viewer.MockViewer
- vc Context
- vc viewer
- vc viewer.CommonContext
- vc viewer.Context
- w http.ResponseWriter
- w io.Writer
unconvert:
fast-math: true
wrapcheck:
ignore-sig-regexps:
- ".*confkit.*Validate.*"
ignore-package-globs:
- "go.jetify.com/axiom/api/*"
exclusions:
rules:
# Exclude dupl linter from test files
- path: _test\.go
linters:
- dupl
formatters:
enable:
- gofumpt
- goimports
settings:
gofumpt:
extra-rules: true
module-path: go.jetify.com