Skip to content

Commit eeb2088

Browse files
build(deps): bump github.com/mgechev/revive from 1.3.3 to 1.3.4 (#4087)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent b974c30 commit eeb2088

File tree

4 files changed

+40
-8
lines changed

4 files changed

+40
-8
lines changed

.golangci.reference.yml

+28
Original file line numberDiff line numberDiff line change
@@ -1529,6 +1529,8 @@ linters-settings:
15291529
- name: early-return
15301530
severity: warning
15311531
disabled: false
1532+
arguments:
1533+
- "preserveScope"
15321534
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#empty-block
15331535
- name: empty-block
15341536
severity: warning
@@ -1537,6 +1539,12 @@ linters-settings:
15371539
- name: empty-lines
15381540
severity: warning
15391541
disabled: false
1542+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#enforce-map-style
1543+
- name: enforce-map-style
1544+
severity: warning
1545+
disabled: false
1546+
arguments:
1547+
- "make"
15401548
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#error-naming
15411549
- name: error-naming
15421550
severity: warning
@@ -1558,6 +1566,7 @@ linters-settings:
15581566
severity: warning
15591567
disabled: false
15601568
arguments:
1569+
- "preserveScope"
15611570
- "checkPrivateReceivers"
15621571
- "sayRepetitiveInsteadOfStutters"
15631572
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#file-header
@@ -1600,6 +1609,14 @@ linters-settings:
16001609
- name: indent-error-flow
16011610
severity: warning
16021611
disabled: false
1612+
arguments:
1613+
- "preserveScope"
1614+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#import-alias-naming
1615+
- name: import-alias-naming
1616+
severity: warning
1617+
disabled: false
1618+
arguments:
1619+
- "^[a-z][a-z0-9]{0,}$"
16031620
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#imports-blacklist
16041621
- name: imports-blacklist
16051622
severity: warning
@@ -1657,6 +1674,10 @@ linters-settings:
16571674
- name: receiver-naming
16581675
severity: warning
16591676
disabled: false
1677+
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redundant-import-alias
1678+
- name: redundant-import-alias
1679+
severity: warning
1680+
disabled: false
16601681
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#redefines-builtin-id
16611682
- name: redefines-builtin-id
16621683
severity: warning
@@ -1690,6 +1711,8 @@ linters-settings:
16901711
- name: superfluous-else
16911712
severity: warning
16921713
disabled: false
1714+
arguments:
1715+
- "preserveScope"
16931716
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal
16941717
- name: time-equal
16951718
severity: warning
@@ -1705,6 +1728,7 @@ linters-settings:
17051728
arguments:
17061729
- [ "ID" ] # AllowList
17071730
- [ "VM" ] # DenyList
1731+
- - upperCaseConst: true
17081732
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-declaration
17091733
- name: var-declaration
17101734
severity: warning
@@ -1740,10 +1764,14 @@ linters-settings:
17401764
- name: unused-parameter
17411765
severity: warning
17421766
disabled: false
1767+
arguments:
1768+
- allowRegex: "^_"
17431769
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-receiver
17441770
- name: unused-receiver
17451771
severity: warning
17461772
disabled: false
1773+
arguments:
1774+
- allowRegex: "^_"
17471775
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#useless-break
17481776
- name: useless-break
17491777
severity: warning

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ require (
6969
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26
7070
github.com/mattn/go-colorable v0.1.13
7171
github.com/mbilski/exhaustivestruct v1.2.0
72-
github.com/mgechev/revive v1.3.3
72+
github.com/mgechev/revive v1.3.4
7373
github.com/mitchellh/go-homedir v1.1.0
7474
github.com/mitchellh/go-ps v1.0.0
7575
github.com/mitchellh/mapstructure v1.5.0
@@ -130,7 +130,7 @@ require (
130130
github.com/beorn7/perks v1.0.1 // indirect
131131
github.com/ccojocar/zxcvbn-go v1.0.1 // indirect
132132
github.com/cespare/xxhash/v2 v2.1.2 // indirect
133-
github.com/chavacava/garif v0.0.0-20230608123814-4bd63c2919ab // indirect
133+
github.com/chavacava/garif v0.1.0 // indirect
134134
github.com/davecgh/go-spew v1.1.1 // indirect
135135
github.com/ettle/strcase v0.1.1 // indirect
136136
github.com/fatih/structtag v1.2.0 // indirect

go.sum

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

pkg/golinters/revive.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func safeTomlSlice(r []any) []any {
247247
}
248248

249249
// This element is not exported by revive, so we need copy the code.
250-
// Extracted from https://github.com/mgechev/revive/blob/v1.3.0/config/config.go#L15
250+
// Extracted from https://github.com/mgechev/revive/blob/v1.3.4/config/config.go#L15
251251
var defaultRules = []lint.Rule{
252252
&rule.VarDeclarationsRule{},
253253
&rule.PackageCommentsRule{},
@@ -267,7 +267,6 @@ var defaultRules = []lint.Rule{
267267
&rule.TimeNamingRule{},
268268
&rule.ContextKeysType{},
269269
&rule.ContextAsArgumentRule{},
270-
&rule.IfReturnRule{},
271270
&rule.EmptyBlockRule{},
272271
&rule.SuperfluousElseRule{},
273272
&rule.UnusedParamRule{},
@@ -317,12 +316,17 @@ var allRules = append([]lint.Rule{
317316
&rule.FunctionLength{},
318317
&rule.NestedStructs{},
319318
&rule.UselessBreak{},
319+
&rule.UncheckedTypeAssertionRule{},
320320
&rule.TimeEqualRule{},
321321
&rule.BannedCharsRule{},
322322
&rule.OptimizeOperandsOrderRule{},
323323
&rule.UseAnyRule{},
324324
&rule.DataRaceRule{},
325325
&rule.CommentSpacingsRule{},
326+
&rule.IfReturnRule{},
327+
&rule.RedundantImportAlias{},
328+
&rule.ImportAliasNamingRule{},
329+
&rule.EnforceMapStyleRule{},
326330
}, defaultRules...)
327331

328332
const defaultConfidence = 0.8

0 commit comments

Comments
 (0)