Skip to content

Commit c751e5c

Browse files
build(deps): bump github.com/alecthomas/go-check-sumtype from 0.2.0 to 0.3.1 (#5230)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent 87ea9ef commit c751e5c

File tree

6 files changed

+22
-9
lines changed

6 files changed

+22
-9
lines changed

.golangci.next.reference.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,9 @@ linters-settings:
670670
# Presence of `default` case in switch statements satisfies exhaustiveness, if all members are not listed.
671671
# Default: true
672672
default-signifies-exhaustive: false
673+
# Include shared interfaces in the exhaustiviness check.
674+
# Default: false
675+
include-shared-interfaces: true
673676

674677
gocognit:
675678
# Minimal code complexity to report.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require (
1515
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24
1616
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0
1717
github.com/OpenPeeDeeP/depguard/v2 v2.2.0
18-
github.com/alecthomas/go-check-sumtype v0.2.0
18+
github.com/alecthomas/go-check-sumtype v0.3.1
1919
github.com/alexkohler/nakedret/v2 v2.0.5
2020
github.com/alexkohler/prealloc v1.0.0
2121
github.com/alingse/asasalint v0.0.11

go.sum

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

jsonschema/golangci.next.jsonschema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,6 +1216,11 @@
12161216
"description": "Presence of `default` case in switch statements satisfies exhaustiveness, if all members are not listed.",
12171217
"type": "boolean",
12181218
"default": true
1219+
},
1220+
"include-shared-interfaces": {
1221+
"description": "Include shared interfaces in the exhaustiviness check.",
1222+
"type": "boolean",
1223+
"default": false
12191224
}
12201225
}
12211226
},

pkg/config/linters_settings.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,7 @@ type GinkgoLinterSettings struct {
505505

506506
type GoChecksumTypeSettings struct {
507507
DefaultSignifiesExhaustive bool `mapstructure:"default-signifies-exhaustive"`
508+
IncludeSharedInterfaces bool `mapstructure:"include-shared-interfaces"`
508509
}
509510

510511
type GocognitSettings struct {

pkg/golinters/gochecksumtype/gochecksumtype.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,13 @@ func runGoCheckSumType(pass *analysis.Pass, settings *config.GoChecksumTypeSetti
6161
TypesInfo: pass.TypesInfo,
6262
}
6363

64+
cfg := gochecksumtype.Config{
65+
DefaultSignifiesExhaustive: settings.DefaultSignifiesExhaustive,
66+
IncludeSharedInterfaces: settings.IncludeSharedInterfaces,
67+
}
68+
6469
var unknownError error
65-
errors := gochecksumtype.Run([]*packages.Package{pkg},
66-
gochecksumtype.Config{DefaultSignifiesExhaustive: settings.DefaultSignifiesExhaustive})
70+
errors := gochecksumtype.Run([]*packages.Package{pkg}, cfg)
6771
for _, err := range errors {
6872
err, ok := err.(gochecksumtype.Error)
6973
if !ok {

0 commit comments

Comments
 (0)