Skip to content

Commit

Permalink
build(deps): bump github.com/sashamelentyev/usestdlibvars from 1.17.1…
Browse files Browse the repository at this point in the history
… to 1.19.0 (golangci#3206)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
2 people authored and SeigeC committed Apr 4, 2023
1 parent 85f9073 commit fc361cf
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .golangci.reference.yml
Expand Up @@ -1780,6 +1780,9 @@ linters-settings:
# Suggest the use of tls.SignatureScheme.String()
# Default: false
tls-signature-scheme: true
# suggest the use of constant.Kind.String()
# Default: false
constant-kind: true

unparam:
# Inspect exported functions.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -78,7 +78,7 @@ require (
github.com/ryanrolds/sqlclosecheck v0.3.0
github.com/sanposhiho/wastedassign/v2 v2.0.6
github.com/sashamelentyev/interfacebloat v1.1.0
github.com/sashamelentyev/usestdlibvars v1.17.1
github.com/sashamelentyev/usestdlibvars v1.19.0
github.com/securego/gosec/v2 v2.13.1
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
github.com/shirou/gopsutil/v3 v3.22.8
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/config/linters_settings.go
Expand Up @@ -650,6 +650,7 @@ type UseStdlibVarsSettings struct {
OSDevNullFlag bool `mapstructure:"os-dev-null-flag"`
SQLIsolationLevelFlag bool `mapstructure:"sql-isolation-level-flag"`
TLSSignatureSchemeFlag bool `mapstructure:"tls-signature-scheme-flag"`
ConstantKind bool `mapstructure:"constant-kind"`
}

type UnparamSettings struct {
Expand Down
11 changes: 6 additions & 5 deletions pkg/golinters/usestdlibvars.go
Expand Up @@ -14,15 +14,16 @@ func NewUseStdlibVars(cfg *config.UseStdlibVarsSettings) *goanalysis.Linter {
cfgMap := make(map[string]map[string]interface{})
if cfg != nil {
cfgMap[a.Name] = map[string]interface{}{
analyzer.ConstantKindFlag: cfg.ConstantKind,
analyzer.CryptoHashFlag: cfg.CryptoHash,
analyzer.HTTPMethodFlag: cfg.HTTPMethod,
analyzer.HTTPStatusCodeFlag: cfg.HTTPStatusCode,
analyzer.TimeWeekdayFlag: cfg.TimeWeekday,
analyzer.TimeMonthFlag: cfg.TimeMonth,
analyzer.TimeLayoutFlag: cfg.TimeLayout,
analyzer.CryptoHashFlag: cfg.CryptoHash,
analyzer.RPCDefaultPathFlag: cfg.DefaultRPCPathFlag,
analyzer.OSDevNullFlag: cfg.OSDevNullFlag,
analyzer.RPCDefaultPathFlag: cfg.DefaultRPCPathFlag,
analyzer.SQLIsolationLevelFlag: cfg.SQLIsolationLevelFlag,
analyzer.TimeLayoutFlag: cfg.TimeLayout,
analyzer.TimeMonthFlag: cfg.TimeMonth,
analyzer.TimeWeekdayFlag: cfg.TimeWeekday,
analyzer.TLSSignatureSchemeFlag: cfg.TLSSignatureSchemeFlag,
}
}
Expand Down

0 comments on commit fc361cf

Please sign in to comment.