Skip to content

Commit fc361cf

Browse files
dependabot[bot]ldez
authored andcommitted
build(deps): bump github.com/sashamelentyev/usestdlibvars from 1.17.1 to 1.19.0 (golangci#3206)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent 85f9073 commit fc361cf

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

.golangci.reference.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,6 +1780,9 @@ linters-settings:
17801780
# Suggest the use of tls.SignatureScheme.String()
17811781
# Default: false
17821782
tls-signature-scheme: true
1783+
# suggest the use of constant.Kind.String()
1784+
# Default: false
1785+
constant-kind: true
17831786

17841787
unparam:
17851788
# Inspect exported functions.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ require (
7878
github.com/ryanrolds/sqlclosecheck v0.3.0
7979
github.com/sanposhiho/wastedassign/v2 v2.0.6
8080
github.com/sashamelentyev/interfacebloat v1.1.0
81-
github.com/sashamelentyev/usestdlibvars v1.17.1
81+
github.com/sashamelentyev/usestdlibvars v1.19.0
8282
github.com/securego/gosec/v2 v2.13.1
8383
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c
8484
github.com/shirou/gopsutil/v3 v3.22.8

go.sum

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/config/linters_settings.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,7 @@ type UseStdlibVarsSettings struct {
650650
OSDevNullFlag bool `mapstructure:"os-dev-null-flag"`
651651
SQLIsolationLevelFlag bool `mapstructure:"sql-isolation-level-flag"`
652652
TLSSignatureSchemeFlag bool `mapstructure:"tls-signature-scheme-flag"`
653+
ConstantKind bool `mapstructure:"constant-kind"`
653654
}
654655

655656
type UnparamSettings struct {

pkg/golinters/usestdlibvars.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +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.ConstantKindFlag: cfg.ConstantKind,
18+
analyzer.CryptoHashFlag: cfg.CryptoHash,
1719
analyzer.HTTPMethodFlag: cfg.HTTPMethod,
1820
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,
2421
analyzer.OSDevNullFlag: cfg.OSDevNullFlag,
22+
analyzer.RPCDefaultPathFlag: cfg.DefaultRPCPathFlag,
2523
analyzer.SQLIsolationLevelFlag: cfg.SQLIsolationLevelFlag,
24+
analyzer.TimeLayoutFlag: cfg.TimeLayout,
25+
analyzer.TimeMonthFlag: cfg.TimeMonth,
26+
analyzer.TimeWeekdayFlag: cfg.TimeWeekday,
2627
analyzer.TLSSignatureSchemeFlag: cfg.TLSSignatureSchemeFlag,
2728
}
2829
}

0 commit comments

Comments
 (0)