Skip to content

Commit 70d595e

Browse files
build(deps): bump github.com/sashamelentyev/usestdlibvars from 1.14.0 to 1.17.1 (#3188)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 40082da commit 70d595e

File tree

5 files changed

+38
-22
lines changed

5 files changed

+38
-22
lines changed

.golangci.reference.yml

+12-3
Original file line numberDiff line numberDiff line change
@@ -1699,21 +1699,30 @@ linters-settings:
16991699
# Suggest the use of http.StatusXX
17001700
# Default: true
17011701
http-status-code: false
1702-
# Suggest the use of time.Weekday
1702+
# Suggest the use of time.Weekday.String()
17031703
# Default: true
17041704
time-weekday: true
1705-
# Suggest the use of time.Month
1705+
# Suggest the use of time.Month.String()
17061706
# Default: false
17071707
time-month: true
17081708
# Suggest the use of time.Layout
17091709
# Default: false
17101710
time-layout: true
1711-
# Suggest the use of crypto.Hash
1711+
# Suggest the use of crypto.Hash.String()
17121712
# Default: false
17131713
crypto-hash: true
17141714
# Suggest the use of rpc.DefaultXXPath
17151715
# Default: false
17161716
default-rpc-path: true
1717+
# Suggest the use of os.DevNull
1718+
# Default: false
1719+
os-dev-null: true
1720+
# Suggest the use of sql.LevelXX.String()
1721+
# Default: false
1722+
sql-isolation-level: true
1723+
# Suggest the use of tls.SignatureScheme.String()
1724+
# Default: false
1725+
tls-signature-scheme: true
17171726

17181727
unparam:
17191728
# Inspect exported functions.

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ require (
7676
github.com/ryanrolds/sqlclosecheck v0.3.0
7777
github.com/sanposhiho/wastedassign/v2 v2.0.6
7878
github.com/sashamelentyev/interfacebloat v1.1.0
79-
github.com/sashamelentyev/usestdlibvars v1.14.0
79+
github.com/sashamelentyev/usestdlibvars v1.17.1
8080
github.com/securego/gosec/v2 v2.13.1
8181
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
8282
github.com/shirou/gopsutil/v3 v3.22.8
@@ -177,7 +177,7 @@ require (
177177
golang.org/x/exp/typeparams v0.0.0-20220827204233-334a2380cb91 // indirect
178178
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
179179
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
180-
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
180+
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect
181181
golang.org/x/text v0.3.7 // indirect
182182
google.golang.org/protobuf v1.28.0 // indirect
183183
gopkg.in/ini.v1 v1.66.6 // indirect

go.sum

+4-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

+10-7
Original file line numberDiff line numberDiff line change
@@ -615,13 +615,16 @@ type TenvSettings struct {
615615
}
616616

617617
type UseStdlibVarsSettings struct {
618-
HTTPMethod bool `mapstructure:"http-method"`
619-
HTTPStatusCode bool `mapstructure:"http-status-code"`
620-
TimeWeekday bool `mapstructure:"time-weekday"`
621-
TimeMonth bool `mapstructure:"time-month"`
622-
TimeLayout bool `mapstructure:"time-layout"`
623-
CryptoHash bool `mapstructure:"crypto-hash"`
624-
DefaultRPCPathFlag bool `mapstructure:"default-rpc-path"`
618+
HTTPMethod bool `mapstructure:"http-method"`
619+
HTTPStatusCode bool `mapstructure:"http-status-code"`
620+
TimeWeekday bool `mapstructure:"time-weekday"`
621+
TimeMonth bool `mapstructure:"time-month"`
622+
TimeLayout bool `mapstructure:"time-layout"`
623+
CryptoHash bool `mapstructure:"crypto-hash"`
624+
DefaultRPCPathFlag bool `mapstructure:"default-rpc-path"`
625+
OSDevNullFlag bool `mapstructure:"os-dev-null-flag"`
626+
SQLIsolationLevelFlag bool `mapstructure:"sql-isolation-level-flag"`
627+
TLSSignatureSchemeFlag bool `mapstructure:"tls-signature-scheme-flag"`
625628
}
626629

627630
type UnparamSettings struct {

pkg/golinters/usestdlibvars.go

+10-7
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,16 @@ func NewUseStdlibVars(cfg *config.UseStdlibVarsSettings) *goanalysis.Linter {
1414
cfgMap := make(map[string]map[string]interface{})
1515
if cfg != nil {
1616
cfgMap[a.Name] = map[string]interface{}{
17-
analyzer.HTTPMethodFlag: cfg.HTTPMethod,
18-
analyzer.HTTPStatusCodeFlag: cfg.HTTPStatusCode,
19-
analyzer.TimeWeekdayFlag: cfg.TimeWeekday,
20-
analyzer.TimeMonthFlag: cfg.TimeMonth,
21-
analyzer.TimeLayoutFlag: cfg.TimeLayout,
22-
analyzer.CryptoHashFlag: cfg.CryptoHash,
23-
analyzer.DefaultRPCPathFlag: cfg.DefaultRPCPathFlag,
17+
analyzer.HTTPMethodFlag: cfg.HTTPMethod,
18+
analyzer.HTTPStatusCodeFlag: cfg.HTTPStatusCode,
19+
analyzer.TimeWeekdayFlag: cfg.TimeWeekday,
20+
analyzer.TimeMonthFlag: cfg.TimeMonth,
21+
analyzer.TimeLayoutFlag: cfg.TimeLayout,
22+
analyzer.CryptoHashFlag: cfg.CryptoHash,
23+
analyzer.RPCDefaultPathFlag: cfg.DefaultRPCPathFlag,
24+
analyzer.OSDevNullFlag: cfg.OSDevNullFlag,
25+
analyzer.SQLIsolationLevelFlag: cfg.SQLIsolationLevelFlag,
26+
analyzer.TLSSignatureSchemeFlag: cfg.TLSSignatureSchemeFlag,
2427
}
2528
}
2629

0 commit comments

Comments
 (0)