fix lint
This commit is contained in:
1 parent
a6009dba69
commit
610858fd06
2 files changed
+9
-1
No files matched your search
@@ -21,7 +21,12 @@ linters:
|
||||
- wsl_v5 # расставление пробелов очень индивидуально
|
||||
- godoclint # ругается на // nolint, не удобно
|
||||
- prealloc # слишком аггресивный, в большинстве случаев не требуется
|
||||
- gomodguard # deprecated
|
||||
- goconst # слишком агрессивный
|
||||
settings:
|
||||
exhaustruct_v5:
|
||||
allow-empty: true
|
||||
explicit-mode: true
|
||||
cyclop:
|
||||
max-complexity: 15 # по умолчанию 10 мало
|
||||
funlen:
|
||||
@@ -71,6 +76,9 @@ linters:
|
||||
- linters:
|
||||
- wrapcheck
|
||||
path: httperrors #отсутствует необходимость оборачивать ошибки
|
||||
- linters:
|
||||
- goconst
|
||||
path: "tests/" # компонентные тесты: фикстуры и моки не выносим в константы
|
||||
paths:
|
||||
- third_party$
|
||||
- builtin$
|
||||
|
||||
@@ -18,7 +18,7 @@ type Middleware func(next Handler) Handler
|
||||
|
||||
// nolint:ireturn
|
||||
func Chain(root Handler, middlewares ...Middleware) Handler {
|
||||
for i := len(middlewares) - 1; i >= 0; i-- {
|
||||
for i := len(middlewares) - 1; i >= 0; i-- { // nolint:modernize
|
||||
root = middlewares[i](root)
|
||||
}
|
||||
return root
|
||||
|
||||
Reference in new issue
Block a user