From 7f25fee16b4683618f2b3c362465e3a513bcb4f8 Mon Sep 17 00:00:00 2001 From: Maik Schreiber Date: Sat, 20 Nov 2021 16:36:07 +0100 Subject: [PATCH] bump varnamelen from v0.4.0 to v0.5.0 (#2369) --- .golangci.example.yml | 4 +++- go.mod | 2 +- go.sum | 2 ++ pkg/golinters/gocritic.go | 2 +- pkg/golinters/godot.go | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.golangci.example.yml b/.golangci.example.yml index ff519ff2bef9..a79b718ce947 100644 --- a/.golangci.example.yml +++ b/.golangci.example.yml @@ -717,13 +717,15 @@ linters-settings: ignore-names: - err # Optional list of variable declarations that should be ignored completely. (defaults to empty list) - # Entries must be in the form of " " or " *". + # Entries must be in the form of " " or " *" for + # variables, or "const " for constants. ignore-decls: - c echo.Context - t testing.T - f *foo.Bar - e error - i int + - const C whitespace: multi-if: false # Enforces newlines (or comments) after every multi-line if statement diff --git a/go.mod b/go.mod index 5f6624f4faf5..26cdd7b24a0b 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/ashanbrown/forbidigo v1.2.0 github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde github.com/bkielbasa/cyclop v1.2.0 - github.com/blizzy78/varnamelen v0.4.0 + github.com/blizzy78/varnamelen v0.5.0 github.com/bombsimon/wsl/v3 v3.3.0 github.com/breml/bidichk v0.2.1 github.com/butuzov/ireturn v0.1.1 diff --git a/go.sum b/go.sum index 6b4e1d67ff2b..7d46389e69d9 100644 --- a/go.sum +++ b/go.sum @@ -104,6 +104,8 @@ github.com/bkielbasa/cyclop v1.2.0 h1:7Jmnh0yL2DjKfw28p86YTd/B4lRGcNuu12sKE35sM7 github.com/bkielbasa/cyclop v1.2.0/go.mod h1:qOI0yy6A7dYC4Zgsa72Ppm9kONl0RoIlPbzot9mhmeI= github.com/blizzy78/varnamelen v0.4.0 h1:TER4mfhjU4D4+k5VJgI/ZG8oT+yGqq7iEi0xjNdjI/U= github.com/blizzy78/varnamelen v0.4.0/go.mod h1:Mc0nLBKI1/FP0Ga4kqMOgBig0eS5QtR107JnMAb1Wuc= +github.com/blizzy78/varnamelen v0.5.0 h1:v9LpMwxzTqAJC4lsD/jR7zWb8a66trcqhTEH4Mk6Fio= +github.com/blizzy78/varnamelen v0.5.0/go.mod h1:Mc0nLBKI1/FP0Ga4kqMOgBig0eS5QtR107JnMAb1Wuc= github.com/bombsimon/wsl/v3 v3.3.0 h1:Mka/+kRLoQJq7g2rggtgQsjuI/K5Efd87WX96EWFxjM= github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/breml/bidichk v0.2.1 h1:SRNtZuLdfkxtocj+xyHXKC1Uv3jVi6EPYx+NHSTNQvE= diff --git a/pkg/golinters/gocritic.go b/pkg/golinters/gocritic.go index e40d328ebfc3..ebc876bd579f 100644 --- a/pkg/golinters/gocritic.go +++ b/pkg/golinters/gocritic.go @@ -121,7 +121,7 @@ func configureCheckerInfo( // Maybe in the future, this kind of conversion will be done in go-critic itself. func normalizeCheckerParamsValue(lintCtx *linter.Context, p interface{}) interface{} { rv := reflect.ValueOf(p) - //nolint:exhaustive // only 3 types (int, bool, and string) are supported by CheckerParam.Value + // nolint:exhaustive // only 3 types (int, bool, and string) are supported by CheckerParam.Value switch rv.Type().Kind() { case reflect.Int64, reflect.Int32, reflect.Int16, reflect.Int8, reflect.Int: return int(rv.Int()) diff --git a/pkg/golinters/godot.go b/pkg/golinters/godot.go index 6252458909eb..57c9c4493fd8 100644 --- a/pkg/golinters/godot.go +++ b/pkg/golinters/godot.go @@ -36,7 +36,7 @@ func NewGodot() *goanalysis.Linter { } // Convert deprecated setting - if cfg.CheckAll { // nolint: staticcheck + if cfg.CheckAll { // nolint:staticcheck settings.Scope = godot.TopLevelScope }