Skip to content

build(deps): bump github.com/mgechev/revive from 1.10.0 to 1.11.0 #5933

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

Merged
merged 2 commits into from
Jul 12, 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
15 changes: 13 additions & 2 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2393,6 +2393,12 @@ linters:
exclude: [""]
arguments:
- "make"
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-switch-style
- name: enforce-switch-style
severity: warning
disabled: false
exclude: [""]
arguments: [ "allowNoDefault" ]
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#error-naming
- name: error-naming
severity: warning
Expand Down Expand Up @@ -2683,7 +2689,7 @@ linters:
disabled: false
exclude: [""]
arguments:
- "fmt.Printf"
- "^fmt.Printf"
- "myFunction"
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unnecessary-format
- name: unnecessary-format
Expand Down Expand Up @@ -2747,7 +2753,12 @@ linters:
arguments:
- [ "ID" ] # AllowList
- [ "VM" ] # DenyList
- - upper-case-const: true # Extra parameter (upper-case-const|skip-package-name-checks)
- - skip-initialism-name-checks: true
upper-case-const: true
skip-package-name-checks: true
extra-bad-package-names:
- helpers
- models
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#waitgroup-by-value
- name: waitgroup-by-value
severity: warning
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ require (
github.com/maratori/testpackage v1.1.1
github.com/matoous/godox v1.1.0
github.com/mattn/go-colorable v0.1.14
github.com/mgechev/revive v1.10.0
github.com/mgechev/revive v1.11.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 @@ -214,7 +214,7 @@ require (
go.uber.org/zap v1.24.0 // indirect
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 // indirect
golang.org/x/exp/typeparams v0.0.0-20250620022241-b7579e27df2b // indirect
golang.org/x/text v0.26.0 // indirect
golang.org/x/text v0.27.0 // indirect
golang.org/x/tools/go/expect v0.1.1-deprecated // indirect
golang.org/x/tools/go/packages/packagestest v0.1.1-deprecated // indirect
google.golang.org/protobuf v1.36.6 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum

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

1 change: 1 addition & 0 deletions jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,7 @@
"enforce-map-style",
"enforce-repeated-arg-type-style",
"enforce-slice-style",
"enforce-switch-style",
"error-naming",
"error-return",
"error-strings",
Expand Down
9 changes: 5 additions & 4 deletions pkg/golinters/revive/revive.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,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.10.0/config/config.go#L16
// Extracted from https://github.com/mgechev/revive/blob/v1.11.0/config/config.go#L166
var defaultRules = []lint.Rule{
&rule.VarDeclarationsRule{},
&rule.PackageCommentsRule{},
Expand Down Expand Up @@ -320,6 +320,7 @@ var allRules = append([]lint.Rule{
&rule.EnforceMapStyleRule{},
&rule.EnforceRepeatedArgTypeStyleRule{},
&rule.EnforceSliceStyleRule{},
&rule.EnforceSwitchStyleRule{},
&rule.FileHeaderRule{},
&rule.FileLengthLimitRule{},
&rule.FilenameFormatRule{},
Expand Down Expand Up @@ -366,7 +367,7 @@ var allRules = append([]lint.Rule{
const defaultConfidence = 0.8

// 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#L183
// Extracted from https://github.com/mgechev/revive/blob/v1.11.0/config/config.go#L198
func normalizeConfig(cfg *lint.Config) {
// NOTE(ldez): this custom section for golangci-lint should be kept.
// ---
Expand Down Expand Up @@ -408,7 +409,7 @@ func normalizeConfig(cfg *lint.Config) {
}

// 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#L252
// Extracted from https://github.com/mgechev/revive/blob/v1.11.0/config/config.go#L266
func defaultConfig() *lint.Config {
defaultConfig := lint.Config{
Confidence: defaultConfidence,
Expand Down Expand Up @@ -454,7 +455,7 @@ func extractRulesName(rules []lint.Rule) []string {
return names
}

// Extracted from https://github.com/mgechev/revive/blob/v1.7.0/formatter/severity.go
// Extracted from https://github.com/mgechev/revive/blob/v1.11.0/formatter/severity.go
// Modified to use pointers (related to hugeParam rule).
func severity(cfg *lint.Config, failure *lint.Failure) lint.Severity {
if cfg, ok := cfg.Rules[failure.RuleName]; ok && cfg.Severity == lint.SeverityError {
Expand Down
Loading