-
Notifications
You must be signed in to change notification settings - Fork 38
/
oserrors.yml
28 lines (28 loc) · 909 Bytes
/
oserrors.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
rules:
- id: os-error-is-exist
patterns:
- pattern: os.IsExist($ERR)
fix: errors.Is($ERR, fs.ErrExist)
message: "New code should use errors.Is with the appropriate error type"
languages: [go]
severity: ERROR
- id: os-error-is-not-exist
patterns:
- pattern: os.IsNotExist($ERR)
fix: errors.Is($ERR, fs.ErrNotExist)
message: "New code should use errors.Is with the appropriate error type"
languages: [go]
severity: ERROR
- id: os-error-is-permission
patterns:
- pattern: os.IsPermission($ERR)
fix: errors.Is($ERR, fs.ErrPermission)
message: "New code should use errors.Is with the appropriate error type"
languages: [go]
severity: ERROR
- id: os-error-is-timeout
patterns:
- pattern: os.IsTimeout(...)
message: "New code should use errors.Is with the appropriate error type"
languages: [go]
severity: ERROR