-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
73 lines (71 loc) · 1.98 KB
/
Copy path.golangci.yml
File metadata and controls
73 lines (71 loc) · 1.98 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
version: "2"
run:
timeout: 5m
linters:
enable:
- errcheck
- forcetypeassert
- govet
- staticcheck
- unused
- ineffassign
- unconvert
- wastedassign
settings:
errcheck:
# Only genuinely fire-and-forget calls are excluded. Parse/read calls
# (json.Unmarshal, io.ReadAll, json.Decoder.Decode, fmt.Sscanf) are NOT
# excluded — a dropped decode/read error hides a real fault and is the
# class fuzzing keeps surfacing, so it must be handled or surfaced.
exclude-functions:
# HTTP response writing — errors indicate client disconnected
- (net/http.ResponseWriter).Write
- (*encoding/json.Encoder).Encode
# Streaming / copying
- io.Copy
# Writer helpers
- (*bufio.Writer).WriteString
- (*archive/tar.Writer).WriteHeader
- (*bytes.Buffer).Write
- (*bytes.Buffer).WriteString
# Crypto / formatting
- (crypto/rand).Read
# Shell output — best effort
- fmt.Fprintf
- fmt.Fprint
- fmt.Fprintln
# Cleanup / filesystem — best effort
- os.RemoveAll
- os.Remove
- os.MkdirAll
- os.WriteFile
- os.Setenv
# Close / Flush — deferred cleanup, error not actionable
- (io.Closer).Close
- (*os.File).Close
- (*os.File).Write
- (*net.TCPConn).Close
- (*net.UnixConn).Close
- (net.Conn).Close
- (*bufio.Writer).Flush
- (*net/http.Response).Body.Close
# WebSocket
- (*github.com/gorilla/websocket.Conn).WriteJSON
# Process signals (fire-and-forget)
- (*os.Process).Signal
- (*os.Process).Kill
exclusions:
rules:
- path: _test\.go
linters:
- errcheck
- govet
- forcetypeassert
- linters:
- staticcheck
text: "SA1019:"
- linters:
- staticcheck
text: "QF1003:"
paths:
- .build