bump varnamelen from v0.4.0 to v0.5.0 (#2369)

This commit is contained in:
Maik Schreiber 2021-11-20 16:36:07 +01:00 committed by GitHub
parent b67af9afb9
commit 7f25fee16b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 8 additions and 4 deletions

View File

@ -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 "<variable name> <type>" or "<variable name> *<type>".
# Entries must be in the form of "<variable name> <type>" or "<variable name> *<type>" for
# variables, or "const <name>" 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

2
go.mod
View File

@ -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

2
go.sum generated
View File

@ -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=

View File

@ -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())

View File

@ -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
}