]> git.giacomolli.uk - onechat/blob - .golangci.yml
bba6f25a3bcaf1190b09895e04be4d5af7fa99af
[onechat] / .golangci.yml
1 version: "2"
2
3 linters:
4 default: standard
5 enable:
6 - errorlint
7 - gocritic
8 - testifylint
9 - revive
10 - wrapcheck
11 settings:
12 wrapcheck:
13 # go-code: Return ctx.Err() directly.
14 extra-ignore-sigs:
15 - "(context.Context).Err() error"
16 exclusions:
17 rules:
18 # go-code: A function with one error path can return it directly.
19 - linters: [wrapcheck]
20 path: ^records\.go$
21 source: 'return r\.file\.Close\(\)'
22 - linters: [wrapcheck]
23 path: ^log_test\.go$
24 source: 'return os\.Truncate\('
25 - linters: [wrapcheck]
26 path: ^sync_buffer_helper_test\.go$
27 source: 'return b\.buffer\.Write\('
28 - linters: [wrapcheck]
29 path: ^probe\.go$
30 source: 'return s\.inner\.Summarize\('
31 - linters: [wrapcheck]
32 path: ^view\.go$
33 source: 'return false, err'
34 - linters: [wrapcheck]
35 path: ^whatsapp\.go$
36 text: 'sqlstore\.Container\)\.Close\('