14 # go-code: Keep a short declaration with its immediate use.
17 # go-code: Return ctx.Err() directly.
19 - "(context.Context).Err() error"
22 # go-code: A function with one error path can return it directly.
23 - linters: [wrapcheck]
25 source: 'return r\.file\.Close\(\)'
26 - linters: [wrapcheck]
28 source: 'return os\.Truncate\('
29 - linters: [wrapcheck]
30 path: ^sync_buffer_helper_test\.go$
31 source: 'return b\.buffer\.Write\('
32 - linters: [wrapcheck]
34 source: 'return s\.inner\.Summarize\('
35 - linters: [wrapcheck]
37 source: 'return false, err'
38 - linters: [wrapcheck]
40 text: 'sqlstore\.Container\)\.Close\('