-
Notifications
You must be signed in to change notification settings - Fork 295
Expand file tree
/
Copy path.golangci.yaml
More file actions
155 lines (155 loc) · 3.78 KB
/
.golangci.yaml
File metadata and controls
155 lines (155 loc) · 3.78 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
version: "2"
issues:
max-issues-per-linter: 0
max-same-issues: 0
linters:
default: standard
enable:
- asciicheck
- bidichk
- bodyclose
- canonicalheader
- copyloopvar
- decorder
- durationcheck
- embeddedstructfieldcheck
- errchkjson
- errname
- errorlint
- exhaustive
- exptostd
- forbidigo
- forcetypeassert
- gocheckcompilerdirectives
- gochecknoinits
- gochecksumtype
- goconst
- gocritic
- gosec
- govet
- grouper
- iface
- importas
- inamedparam
- ineffassign
- intrange
- ireturn
- loggercheck
- maintidx
- makezero
- mirror
- misspell
- musttag
- nakedret
- nilerr
- nilnesserr
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- perfsprint
- promlinter
- protogetter
- reassign
- recvcheck
- revive
- sloglint
- spancheck
- staticcheck
- tagalign
- testableexamples
- testifylint
- tparallel
- unconvert
- unparam
- unused
- usestdlibvars
- usetesting
- wastedassign
- whitespace
- wrapcheck
settings:
gosec:
excludes:
- G204 # subprocess with variables is expected for git/opencode CLI wrappers
- G702 # command injection via taint - controlled CLI inputs
- G705 # XSS not applicable to CLI stderr output
dupl:
# Token threshold for duplication detection
# Lower = more sensitive (catches smaller duplicates)
# Default is 150. We use 75 for lint (blocks CI), `mise run dup` uses 50 (advisory)
threshold: 75
errcheck:
check-type-assertions: true
check-blank: true
forbidigo:
analyze-types: true
forbid:
- pattern: '^os\.Getwd$'
msg: "os.Getwd() breaks when running from subdirectories - use paths.RepoRoot() for git-relative paths"
pkg: '^os$'
- pattern: '^.*\.Reset$'
msg: "go-git Reset deletes .gitignored dirs - use HardResetWithProtection() from common.go"
pkg: 'github\.com/go-git/go-git'
- pattern: '^.*\.Checkout$'
msg: "go-git Checkout deletes .gitignored dirs - use CheckoutBranch() from git_operations.go"
pkg: 'github\.com/go-git/go-git'
govet:
enable-all: true
disable:
- fieldalignment
- shadow
ireturn:
allow:
- anon
- error
- empty
- stdlib
- grpc.DialOption
- github.com/entireio/cli/cmd/entire/cli/agent.Agent
- github.com/entireio/cli/cmd/entire/cli/checkpoint.CommittedReader
- github.com/entireio/cli/cmd/entire/cli/strategy.Strategy
- github.com/go-git/go-git/v6/plumbing/storer.ReferenceIter
- github.com/go-git/go-git/v6/plumbing.EncodedObject
- github.com/go-git/go-git/v6/storage.Storer
- github.com/go-git/go-git/v6/plumbing/storer.EncodedObjectIter
- github.com/entireio/cli/e2e/agents.Session
- github.com/go-git/go-billy/v6.Filesystem
nolintlint:
require-explanation: true
require-specific: true
sloglint:
attr-only: true
testifylint:
enable-all: true
unparam:
check-exported: true
exclusions:
presets:
- comments
- std-error-handling
rules:
- path: _test\.go
linters:
- gosec
- wrapcheck
- forbidigo
- path: ^e2e/
linters:
- errcheck
- gochecknoinits
- goconst
- gosec
- noctx
- revive
- usetesting
- wrapcheck
- path: ^test/workloads/
linters:
- wrapcheck
- path: ^internal/sim/
linters:
- wrapcheck
- text: "`strat` is a misspelling"
linters:
- misspell