Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite36f9d4

Browse files
build(deps): bump github.com/mgechev/revive from 1.10.0 to 1.11.0 (#5933)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parentd325213 commite36f9d4

File tree

5 files changed

+25
-12
lines changed

5 files changed

+25
-12
lines changed

‎.golangci.next.reference.yml‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2393,6 +2393,12 @@ linters:
23932393
exclude:[""]
23942394
arguments:
23952395
-"make"
2396+
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#enforce-switch-style
2397+
-name:enforce-switch-style
2398+
severity:warning
2399+
disabled:false
2400+
exclude:[""]
2401+
arguments:[ "allowNoDefault" ]
23962402
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#error-naming
23972403
-name:error-naming
23982404
severity:warning
@@ -2683,7 +2689,7 @@ linters:
26832689
disabled:false
26842690
exclude:[""]
26852691
arguments:
2686-
-"fmt.Printf"
2692+
-"^fmt.Printf"
26872693
-"myFunction"
26882694
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#unnecessary-format
26892695
-name:unnecessary-format
@@ -2747,7 +2753,12 @@ linters:
27472753
arguments:
27482754
-[ "ID" ]# AllowList
27492755
-[ "VM" ]# DenyList
2750-
-- upper-case-const:true# Extra parameter (upper-case-const|skip-package-name-checks)
2756+
-- skip-initialism-name-checks:true
2757+
upper-case-const:true
2758+
skip-package-name-checks:true
2759+
extra-bad-package-names:
2760+
-helpers
2761+
-models
27512762
# https://github.com/mgechev/revive/blob/HEAD/RULES_DESCRIPTIONS.md#waitgroup-by-value
27522763
-name:waitgroup-by-value
27532764
severity:warning

‎go.mod‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ require (
8282
github.com/maratori/testpackagev1.1.1
8383
github.com/matoous/godoxv1.1.0
8484
github.com/mattn/go-colorablev0.1.14
85-
github.com/mgechev/revivev1.10.0
85+
github.com/mgechev/revivev1.11.0
8686
github.com/mitchellh/go-homedirv1.1.0
8787
github.com/moricho/tparallelv0.3.2
8888
github.com/nakabonne/nestifv0.3.1
@@ -214,7 +214,7 @@ require (
214214
go.uber.org/zapv1.24.0// indirect
215215
golang.org/x/expv0.0.0-20240909161429-701f63a606c0// indirect
216216
golang.org/x/exp/typeparamsv0.0.0-20250620022241-b7579e27df2b// indirect
217-
golang.org/x/textv0.26.0// indirect
217+
golang.org/x/textv0.27.0// indirect
218218
golang.org/x/tools/go/expectv0.1.1-deprecated// indirect
219219
golang.org/x/tools/go/packages/packagestestv0.1.1-deprecated// indirect
220220
google.golang.org/protobufv1.36.6// indirect

‎go.sum‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎jsonschema/golangci.next.jsonschema.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@
599599
"enforce-map-style",
600600
"enforce-repeated-arg-type-style",
601601
"enforce-slice-style",
602+
"enforce-switch-style",
602603
"error-naming",
603604
"error-return",
604605
"error-strings",

‎pkg/golinters/revive/revive.go‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ func safeTomlSlice(r []any) []any {
269269
}
270270

271271
// This element is not exported by revive, so we need copy the code.
272-
// Extracted from https://github.com/mgechev/revive/blob/v1.10.0/config/config.go#L16
272+
// Extracted from https://github.com/mgechev/revive/blob/v1.11.0/config/config.go#L166
273273
vardefaultRules= []lint.Rule{
274274
&rule.VarDeclarationsRule{},
275275
&rule.PackageCommentsRule{},
@@ -320,6 +320,7 @@ var allRules = append([]lint.Rule{
320320
&rule.EnforceMapStyleRule{},
321321
&rule.EnforceRepeatedArgTypeStyleRule{},
322322
&rule.EnforceSliceStyleRule{},
323+
&rule.EnforceSwitchStyleRule{},
323324
&rule.FileHeaderRule{},
324325
&rule.FileLengthLimitRule{},
325326
&rule.FilenameFormatRule{},
@@ -366,7 +367,7 @@ var allRules = append([]lint.Rule{
366367
constdefaultConfidence=0.8
367368

368369
// This element is not exported by revive, so we need copy the code.
369-
// Extracted from https://github.com/mgechev/revive/blob/v1.5.0/config/config.go#L183
370+
// Extracted from https://github.com/mgechev/revive/blob/v1.11.0/config/config.go#L198
370371
funcnormalizeConfig(cfg*lint.Config) {
371372
// NOTE(ldez): this custom section for golangci-lint should be kept.
372373
// ---
@@ -408,7 +409,7 @@ func normalizeConfig(cfg *lint.Config) {
408409
}
409410

410411
// This element is not exported by revive, so we need copy the code.
411-
// Extracted from https://github.com/mgechev/revive/blob/v1.5.0/config/config.go#L252
412+
// Extracted from https://github.com/mgechev/revive/blob/v1.11.0/config/config.go#L266
412413
funcdefaultConfig()*lint.Config {
413414
defaultConfig:= lint.Config{
414415
Confidence:defaultConfidence,
@@ -454,7 +455,7 @@ func extractRulesName(rules []lint.Rule) []string {
454455
returnnames
455456
}
456457

457-
// Extracted from https://github.com/mgechev/revive/blob/v1.7.0/formatter/severity.go
458+
// Extracted from https://github.com/mgechev/revive/blob/v1.11.0/formatter/severity.go
458459
// Modified to use pointers (related to hugeParam rule).
459460
funcseverity(cfg*lint.Config,failure*lint.Failure) lint.Severity {
460461
ifcfg,ok:=cfg.Rules[failure.RuleName];ok&&cfg.Severity==lint.SeverityError {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp