Skip to content

Commit 2637593

Browse files
build(deps): bump github.com/mgechev/revive from 1.5.1 to 1.6.0 (#5346)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent b4516a6 commit 2637593

File tree

5 files changed

+27
-12
lines changed

5 files changed

+27
-12
lines changed

.golangci.next.reference.yml

+10
Original file line numberDiff line numberDiff line change
@@ -2732,6 +2732,11 @@ linters-settings:
27322732
severity: warning
27332733
disabled: false
27342734
exclude: [""]
2735+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redundant-build-tag
2736+
- name: redundant-build-tag
2737+
severity: warning
2738+
disabled: false
2739+
exclude: [""]
27352740
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redundant-import-alias
27362741
- name: redundant-import-alias
27372742
severity: warning
@@ -2841,6 +2846,11 @@ linters-settings:
28412846
severity: warning
28422847
disabled: false
28432848
exclude: [""]
2849+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#use-errors-new
2850+
- name: use-errors-new
2851+
severity: warning
2852+
disabled: false
2853+
exclude: [""]
28442854
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break
28452855
- name: useless-break
28462856
severity: warning

go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ require (
7676
github.com/maratori/testpackage v1.1.1
7777
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26
7878
github.com/mattn/go-colorable v0.1.14
79-
github.com/mgechev/revive v1.5.1
79+
github.com/mgechev/revive v1.6.0
8080
github.com/mitchellh/go-homedir v1.1.0
8181
github.com/moricho/tparallel v0.3.2
8282
github.com/nakabonne/nestif v0.3.1
@@ -140,7 +140,7 @@ require (
140140
github.com/Masterminds/semver/v3 v3.3.0 // indirect
141141
github.com/beorn7/perks v1.0.1 // indirect
142142
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
143-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
143+
github.com/cespare/xxhash/v2 v2.3.0 // indirect
144144
github.com/chavacava/garif v0.1.0 // indirect
145145
github.com/davecgh/go-spew v1.1.1 // indirect
146146
github.com/ebitengine/purego v0.8.1 // indirect
@@ -184,7 +184,7 @@ require (
184184
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
185185
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
186186
github.com/rivo/uniseg v0.4.7 // indirect
187-
github.com/spf13/afero v1.11.0 // indirect
187+
github.com/spf13/afero v1.12.0 // indirect
188188
github.com/spf13/cast v1.5.0 // indirect
189189
github.com/spf13/jwalterweatherman v1.1.0 // indirect
190190
github.com/stretchr/objx v0.5.2 // indirect

go.sum

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

jsonschema/golangci.next.jsonschema.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -271,11 +271,12 @@
271271
"nested-structs",
272272
"optimize-operands-order",
273273
"package-comments",
274-
"range",
275274
"range-val-address",
276275
"range-val-in-closure",
276+
"range",
277277
"receiver-naming",
278278
"redefines-builtin-id",
279+
"redundant-build-tag",
279280
"redundant-import-alias",
280281
"string-format",
281282
"string-of-int",
@@ -293,6 +294,7 @@
293294
"unused-parameter",
294295
"unused-receiver",
295296
"use-any",
297+
"use-errors-new",
296298
"useless-break",
297299
"var-declaration",
298300
"var-naming",

pkg/golinters/revive/revive.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ func toIssue(pass *analysis.Pass, object *jsonObject) goanalysis.Issue {
209209
// This function mimics the GetConfig function of revive.
210210
// This allows to get default values and right types.
211211
// https://github.com/golangci/golangci-lint/issues/1745
212-
// https://github.com/mgechev/revive/blob/v1.5.0/config/config.go#L220
213-
// https://github.com/mgechev/revive/blob/v1.5.0/config/config.go#L172-L178
212+
// https://github.com/mgechev/revive/blob/v1.6.0/config/config.go#L230
213+
// https://github.com/mgechev/revive/blob/v1.6.0/config/config.go#L182-L188
214214
func getConfig(cfg *config.ReviveSettings) (*lint.Config, error) {
215215
conf := defaultConfig()
216216

@@ -307,7 +307,7 @@ func safeTomlSlice(r []any) []any {
307307
}
308308

309309
// This element is not exported by revive, so we need copy the code.
310-
// Extracted from https://github.com/mgechev/revive/blob/v1.5.0/config/config.go#L16
310+
// Extracted from https://github.com/mgechev/revive/blob/v1.6.0/config/config.go#L16
311311
var defaultRules = []lint.Rule{
312312
&rule.VarDeclarationsRule{},
313313
&rule.PackageCommentsRule{},
@@ -393,6 +393,8 @@ var allRules = append([]lint.Rule{
393393
&rule.CommentsDensityRule{},
394394
&rule.FileLengthLimitRule{},
395395
&rule.FilenameFormatRule{},
396+
&rule.RedundantBuildTagRule{},
397+
&rule.UseErrorsNewRule{},
396398
}, defaultRules...)
397399

398400
const defaultConfidence = 0.8

0 commit comments

Comments
 (0)