X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/a3b9849a54a6cd8a4cc5b1ae03a39aab31322f7b..HEAD:/.golangci.yml diff --git a/.golangci.yml b/.golangci.yml index d5f20b3..2a4cdaf 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -9,7 +9,37 @@ linters: - revive - wrapcheck - nlreturn + - wsl_v5 settings: + wsl_v5: + # go-code: Keep an operation with its immediate error check. + enable: + - err + - after-block + - after-decl + - after-defer + - after-expr + - after-go + # go-code: Keep a short declaration with its immediate use. + allow-first-in-block: true + allow-whole-block: true + cuddle-max-statements: 2 + disable: + # go-code: Keep a short declaration with its immediate assignment use. + - assign + # go-code: Keep a short declaration, its operation, and its error check + # together. + - if + # go-code: A short declaration can feed the next loop setup. + - for + # go-code: A short declaration can feed the next switch setup. + - switch + # go-code: Keep a declared cleanup with its immediate defer. + - defer + # go-code: Keep a short declaration with its immediate append use. + - append + # go-code: Keep a short declaration with its immediate worker setup. + - go nlreturn: # go-code: Keep a short declaration with its immediate use. block-size: 2