Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump github.com/mgechev/revive from 1.5.1 to 1.6.0 #5346

Merged
merged 3 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading