Skip to content

Commit

Permalink
build(deps): bump github.com/mgechev/revive from 1.5.1 to 1.6.0 (#5346)
Browse files Browse the repository at this point in the history
Co-authored-by: Fernandez Ludovic <[email protected]>
  • Loading branch information
dependabot[bot] and ldez authored Jan 23, 2025
1 parent b4516a6 commit 2637593
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 12 deletions.
10 changes: 10 additions & 0 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2732,6 +2732,11 @@ linters-settings:
severity: warning
disabled: false
exclude: [""]
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redundant-build-tag
- name: redundant-build-tag
severity: warning
disabled: false
exclude: [""]
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redundant-import-alias
- name: redundant-import-alias
severity: warning
Expand Down Expand Up @@ -2841,6 +2846,11 @@ linters-settings:
severity: warning
disabled: false
exclude: [""]
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#use-errors-new
- name: use-errors-new
severity: warning
disabled: false
exclude: [""]
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break
- name: useless-break
severity: warning
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ require (
github.com/maratori/testpackage v1.1.1
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26
github.com/mattn/go-colorable v0.1.14
github.com/mgechev/revive v1.5.1
github.com/mgechev/revive v1.6.0
github.com/mitchellh/go-homedir v1.1.0
github.com/moricho/tparallel v0.3.2
github.com/nakabonne/nestif v0.3.1
Expand Down Expand Up @@ -140,7 +140,7 @@ require (
github.com/Masterminds/semver/v3 v3.3.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/ccojocar/zxcvbn-go v1.0.2 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chavacava/garif v0.1.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/ebitengine/purego v0.8.1 // indirect
Expand Down Expand Up @@ -184,7 +184,7 @@ require (
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/afero v1.12.0 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
Expand Down
11 changes: 6 additions & 5 deletions go.sum

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

4 changes: 3 additions & 1 deletion jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,12 @@
"nested-structs",
"optimize-operands-order",
"package-comments",
"range",
"range-val-address",
"range-val-in-closure",
"range",
"receiver-naming",
"redefines-builtin-id",
"redundant-build-tag",
"redundant-import-alias",
"string-format",
"string-of-int",
Expand All @@ -293,6 +294,7 @@
"unused-parameter",
"unused-receiver",
"use-any",
"use-errors-new",
"useless-break",
"var-declaration",
"var-naming",
Expand Down
8 changes: 5 additions & 3 deletions pkg/golinters/revive/revive.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ func toIssue(pass *analysis.Pass, object *jsonObject) goanalysis.Issue {
// This function mimics the GetConfig function of revive.
// This allows to get default values and right types.
// https://github.com/golangci/golangci-lint/issues/1745
// https://github.com/mgechev/revive/blob/v1.5.0/config/config.go#L220
// https://github.com/mgechev/revive/blob/v1.5.0/config/config.go#L172-L178
// https://github.com/mgechev/revive/blob/v1.6.0/config/config.go#L230
// https://github.com/mgechev/revive/blob/v1.6.0/config/config.go#L182-L188
func getConfig(cfg *config.ReviveSettings) (*lint.Config, error) {
conf := defaultConfig()

Expand Down Expand Up @@ -307,7 +307,7 @@ func safeTomlSlice(r []any) []any {
}

// This element is not exported by revive, so we need copy the code.
// Extracted from https://github.com/mgechev/revive/blob/v1.5.0/config/config.go#L16
// Extracted from https://github.com/mgechev/revive/blob/v1.6.0/config/config.go#L16
var defaultRules = []lint.Rule{
&rule.VarDeclarationsRule{},
&rule.PackageCommentsRule{},
Expand Down Expand Up @@ -393,6 +393,8 @@ var allRules = append([]lint.Rule{
&rule.CommentsDensityRule{},
&rule.FileLengthLimitRule{},
&rule.FilenameFormatRule{},
&rule.RedundantBuildTagRule{},
&rule.UseErrorsNewRule{},
}, defaultRules...)

const defaultConfidence = 0.8
Expand Down

0 comments on commit 2637593

Please sign in to comment.