This repository was archived by the owner on Apr 15, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.golangci.yml
More file actions
120 lines (119 loc) · 2.45 KB
/
.golangci.yml
File metadata and controls
120 lines (119 loc) · 2.45 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
110
111
112
113
114
115
116
117
118
119
120
version: "2"
formatters:
enable:
- gofumpt
- goimports
exclusions:
generated: strict
warn-unused: true
settings:
gofumpt:
module-path: github.com/replicate/cog-runtime
extra-rules: true
goimports:
local-prefixes:
- github.com/replicate/cog-runtime
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- copyloopvar
- depguard
- dogsled
- errcheck
- errchkjson
- errname
- errorlint
- forbidigo
- forcetypeassert
- gocheckcompilerdirectives
- gocritic
- gosec
- govet
- ineffassign
- loggercheck
- misspell
- nilnil
- nolintlint
- predeclared
- revive
- rowserrcheck
- spancheck
- staticcheck
- testifylint
- thelper
- unconvert
- unused
- usestdlibvars
- wastedassign
exclusions:
rules:
- path: '(.+)_test\.go'
linters:
- dogsled
- errcheck
- forcetypeassert
- gosec
- depguard
- path: 'cmd/(.+)/main\.go'
linters:
- forbidigo
- source: 'defer resp.Body.Close()'
linters:
- errcheck
- source: 'synctest\.Test\(t, func\(t \*testing\.T\)'
linters:
- thelper
settings:
errcheck:
disable-default-exclusions: false
misspell:
locale: US
nolintlint:
allow-unused: true
allow-no-explanation: []
require-explanation: true
require-specific: true
depguard:
rules:
test-only:
deny:
- pkg: github.com/replicate/cog-runtime/internal/loggingtest
desc: "loggingtest is test-only"
revive:
confidence: 0.8
severity: warning
rules:
- name: argument-limit
- name: atomic
- name: blank-imports
- name: bool-literal-in-expr
- name: context-as-argument
- name: context-keys-type
- name: defer
- name: dot-imports
- name: early-return
- name: empty-block
- name: error-return
- name: error-strings
- name: error-naming
- name: errorf
- name: import-shadowing
- name: indent-error-flow
- name: increment-decrement
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: struct-tag
- name: superfluous-else
- name: time-equal
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: use-any
- name: var-declaration
- name: var-naming