Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump github.com/sashamelentyev/usestdlibvars from 1.14.0 to 1.17.1 #3188

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 12 additions & 3 deletions .golangci.reference.yml
Expand Up @@ -1699,21 +1699,30 @@ linters-settings:
# Suggest the use of http.StatusXX
# Default: true
http-status-code: false
# Suggest the use of time.Weekday
# Suggest the use of time.Weekday.String()
# Default: true
time-weekday: true
# Suggest the use of time.Month
# Suggest the use of time.Month.String()
# Default: false
time-month: true
# Suggest the use of time.Layout
# Default: false
time-layout: true
# Suggest the use of crypto.Hash
# Suggest the use of crypto.Hash.String()
# Default: false
crypto-hash: true
# Suggest the use of rpc.DefaultXXPath
# Default: false
default-rpc-path: true
# Suggest the use of os.DevNull
# Default: false
os-dev-null: true
# Suggest the use of sql.LevelXX.String()
# Default: false
sql-isolation-level: true
# Suggest the use of tls.SignatureScheme.String()
# Default: false
tls-signature-scheme: true

unparam:
# Inspect exported functions.
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Expand Up @@ -76,7 +76,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.14.0
github.com/sashamelentyev/usestdlibvars v1.17.1
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.7
Expand Down Expand Up @@ -177,7 +177,7 @@ require (
golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
Expand Down
7 changes: 4 additions & 3 deletions go.sum

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

17 changes: 10 additions & 7 deletions pkg/config/linters_settings.go
Expand Up @@ -615,13 +615,16 @@ type TenvSettings struct {
}

type UseStdlibVarsSettings struct {
HTTPMethod bool `mapstructure:"http-method"`
HTTPStatusCode bool `mapstructure:"http-status-code"`
TimeWeekday bool `mapstructure:"time-weekday"`
TimeMonth bool `mapstructure:"time-month"`
TimeLayout bool `mapstructure:"time-layout"`
CryptoHash bool `mapstructure:"crypto-hash"`
DefaultRPCPathFlag bool `mapstructure:"default-rpc-path"`
HTTPMethod bool `mapstructure:"http-method"`
HTTPStatusCode bool `mapstructure:"http-status-code"`
TimeWeekday bool `mapstructure:"time-weekday"`
TimeMonth bool `mapstructure:"time-month"`
TimeLayout bool `mapstructure:"time-layout"`
CryptoHash bool `mapstructure:"crypto-hash"`
DefaultRPCPathFlag bool `mapstructure:"default-rpc-path"`
OSDevNullFlag bool `mapstructure:"os-dev-null-flag"`
SQLIsolationLevelFlag bool `mapstructure:"sql-isolation-level-flag"`
TLSSignatureSchemeFlag bool `mapstructure:"tls-signature-scheme-flag"`
}

type UnparamSettings struct {
Expand Down
17 changes: 10 additions & 7 deletions pkg/golinters/usestdlibvars.go
Expand Up @@ -14,13 +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.HTTPMethodFlag: cfg.HTTPMethod,
analyzer.HTTPStatusCodeFlag: cfg.HTTPStatusCode,
analyzer.TimeWeekdayFlag: cfg.TimeWeekday,
analyzer.TimeMonthFlag: cfg.TimeMonth,
analyzer.TimeLayoutFlag: cfg.TimeLayout,
analyzer.CryptoHashFlag: cfg.CryptoHash,
analyzer.DefaultRPCPathFlag: cfg.DefaultRPCPathFlag,
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.SQLIsolationLevelFlag: cfg.SQLIsolationLevelFlag,
analyzer.TLSSignatureSchemeFlag: cfg.TLSSignatureSchemeFlag,
}
}

Expand Down