Skip to content

Commit 2ef1d9a

Browse files
dependabot[bot]ldez
authored andcommitted
build(deps): bump github.com/mgechev/revive from 1.3.6 to 1.3.7 (#4355)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 6fb4091 commit 2ef1d9a

File tree

12 files changed

+21
-15
lines changed

12 files changed

+21
-15
lines changed

Diff for: .golangci.reference.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1734,8 +1734,8 @@ linters-settings:
17341734
disabled: false
17351735
arguments:
17361736
- "^[a-z][a-z0-9]{0,}$"
1737-
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#imports-blacklist
1738-
- name: imports-blacklist
1737+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#imports-blocklist
1738+
- name: imports-blocklist
17391739
severity: warning
17401740
disabled: false
17411741
arguments:
@@ -1750,6 +1750,11 @@ linters-settings:
17501750
severity: warning
17511751
disabled: false
17521752
arguments: [ 80 ]
1753+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#max-control-nesting
1754+
- name: max-control-nesting
1755+
severity: warning
1756+
disabled: false
1757+
arguments: [ 3 ]
17531758
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#max-public-structs
17541759
- name: max-public-structs
17551760
severity: warning

Diff for: go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ require (
7575
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26
7676
github.com/mattn/go-colorable v0.1.13
7777
github.com/mbilski/exhaustivestruct v1.2.0
78-
github.com/mgechev/revive v1.3.6
78+
github.com/mgechev/revive v1.3.7
7979
github.com/mitchellh/go-homedir v1.1.0
8080
github.com/mitchellh/go-ps v1.0.0
8181
github.com/moricho/tparallel v0.3.1

Diff for: go.sum

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

Diff for: pkg/commands/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (e *Executor) initVersion() {
3838
Short: "Version",
3939
Args: cobra.NoArgs,
4040
ValidArgsFunction: cobra.NoFileCompletions,
41-
RunE: func(cmd *cobra.Command, _ []string) error {
41+
RunE: func(_ *cobra.Command, _ []string) error {
4242
if e.cfg.Version.Debug {
4343
info, ok := debug.ReadBuildInfo()
4444
if !ok {

Diff for: pkg/golinters/gochecksumtype.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func NewGoCheckSumType() *goanalysis.Linter {
4545
`Run exhaustiveness checks on Go "sum types"`,
4646
[]*analysis.Analyzer{analyzer},
4747
nil,
48-
).WithIssuesReporter(func(ctx *linter.Context) []goanalysis.Issue {
48+
).WithIssuesReporter(func(_ *linter.Context) []goanalysis.Issue {
4949
return resIssues
5050
}).WithLoadMode(goanalysis.LoadModeTypesInfo)
5151
}

Diff for: pkg/golinters/revive.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func safeTomlSlice(r []any) []any {
247247
}
248248

249249
// This element is not exported by revive, so we need copy the code.
250-
// Extracted from https://github.com/mgechev/revive/blob/v1.3.5/config/config.go#L15
250+
// Extracted from https://github.com/mgechev/revive/blob/v1.3.7/config/config.go#L15
251251
var defaultRules = []lint.Rule{
252252
&rule.VarDeclarationsRule{},
253253
&rule.PackageCommentsRule{},
@@ -290,7 +290,7 @@ var allRules = append([]lint.Rule{
290290
&rule.ModifiesValRecRule{},
291291
&rule.ConstantLogicalExprRule{},
292292
&rule.BoolLiteralRule{},
293-
&rule.ImportsBlacklistRule{},
293+
&rule.ImportsBlocklistRule{},
294294
&rule.FunctionResultsLimitRule{},
295295
&rule.MaxPublicStructsRule{},
296296
&rule.RangeValInClosureRule{},
@@ -329,6 +329,7 @@ var allRules = append([]lint.Rule{
329329
&rule.EnforceMapStyleRule{},
330330
&rule.EnforceRepeatedArgTypeStyleRule{},
331331
&rule.EnforceSliceStyleRule{},
332+
&rule.MaxControlNestingRule{},
332333
}, defaultRules...)
333334

334335
const defaultConfidence = 0.8

Diff for: pkg/golinters/stylecheck.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func NewStylecheck(settings *config.StaticCheckSettings) *goanalysis.Linter {
1515
// `scconfig.Analyzer` is a singleton, then it's not possible to have more than one instance for all staticcheck "sub-linters".
1616
// When we will merge the 4 "sub-linters", the problem will disappear: https://github.com/golangci/golangci-lint/issues/357
1717
// Currently only stylecheck analyzer has a configuration in staticcheck.
18-
scconfig.Analyzer.Run = func(pass *analysis.Pass) (any, error) {
18+
scconfig.Analyzer.Run = func(_ *analysis.Pass) (any, error) {
1919
return cfg, nil
2020
}
2121

Diff for: pkg/golinters/unused.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func NewUnused(settings *config.UnusedSettings, scSettings *config.StaticCheckSe
4747
"Checks Go code for unused constants, variables, functions and types",
4848
[]*analysis.Analyzer{analyzer},
4949
nil,
50-
).WithIssuesReporter(func(lintCtx *linter.Context) []goanalysis.Issue {
50+
).WithIssuesReporter(func(_ *linter.Context) []goanalysis.Issue {
5151
return resIssues
5252
}).WithLoadMode(goanalysis.LoadModeTypesInfo)
5353
}

Diff for: pkg/golinters/varcheck.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func NewVarcheck(settings *config.VarCheckSettings) *goanalysis.Linter {
3030
"Finds unused global variables and constants",
3131
[]*analysis.Analyzer{analyzer},
3232
nil,
33-
).WithContextSetter(func(lintCtx *linter.Context) {
33+
).WithContextSetter(func(_ *linter.Context) {
3434
analyzer.Run = func(pass *analysis.Pass) (any, error) {
3535
issues := runVarCheck(pass, settings)
3636

Diff for: pkg/golinters/whitespace.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func NewWhitespace(settings *config.WhitespaceSettings) *goanalysis.Linter {
3535
a.Doc,
3636
[]*analysis.Analyzer{a},
3737
nil,
38-
).WithContextSetter(func(lintCtx *linter.Context) {
38+
).WithContextSetter(func(_ *linter.Context) {
3939
a.Run = func(pass *analysis.Pass) (any, error) {
4040
issues, err := runWhitespace(pass, wsSettings)
4141
if err != nil {

Diff for: pkg/lint/linter/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (lc *Config) WithNoopFallback(cfg *config.Config) *Config {
138138
lc.Linter = &Noop{
139139
name: lc.Linter.Name(),
140140
desc: lc.Linter.Desc(),
141-
run: func(pass *analysis.Pass) (any, error) {
141+
run: func(_ *analysis.Pass) (any, error) {
142142
return nil, nil
143143
},
144144
}

Diff for: test/testshared/analysis.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func parseComments(sourcePath string, fileData []byte) (map[key][]expectation, e
110110
func parseExpectations(text string) (lineDelta int, expects []expectation, err error) {
111111
var scanErr string
112112
sc := new(scanner.Scanner).Init(strings.NewReader(text))
113-
sc.Error = func(s *scanner.Scanner, msg string) {
113+
sc.Error = func(_ *scanner.Scanner, msg string) {
114114
scanErr = msg // e.g. bad string escape
115115
}
116116
sc.Mode = scanner.ScanIdents | scanner.ScanStrings | scanner.ScanRawStrings | scanner.ScanInts

0 commit comments

Comments
 (0)