X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/000ae97acb21a1c0c90e9278177a74411ba6eab2..d9fddc0f506eb4ead7049f5638674b2b8773fcaa:/.golangci.yml diff --git a/.golangci.yml b/.golangci.yml index 1a7a596..bba6f25 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,3 +6,31 @@ linters: - errorlint - gocritic - testifylint + - revive + - wrapcheck + settings: + wrapcheck: + # go-code: Return ctx.Err() directly. + extra-ignore-sigs: + - "(context.Context).Err() error" + exclusions: + rules: + # go-code: A function with one error path can return it directly. + - linters: [wrapcheck] + path: ^records\.go$ + source: 'return r\.file\.Close\(\)' + - linters: [wrapcheck] + path: ^log_test\.go$ + source: 'return os\.Truncate\(' + - linters: [wrapcheck] + path: ^sync_buffer_helper_test\.go$ + source: 'return b\.buffer\.Write\(' + - linters: [wrapcheck] + path: ^probe\.go$ + source: 'return s\.inner\.Summarize\(' + - linters: [wrapcheck] + path: ^view\.go$ + source: 'return false, err' + - linters: [wrapcheck] + path: ^whatsapp\.go$ + text: 'sqlstore\.Container\)\.Close\('