Skip to content

build(deps): bump github.com/alecthomas/go-check-sumtype from 0.2.0 to 0.3.1 #5230

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
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
3 changes: 3 additions & 0 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,9 @@ linters-settings:
# Presence of `default` case in switch statements satisfies exhaustiveness, if all members are not listed.
# Default: true
default-signifies-exhaustive: false
# Include shared interfaces in the exhaustiviness check.
# Default: false
include-shared-interfaces: true

gocognit:
# Minimal code complexity to report.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.3.0
github.com/OpenPeeDeeP/depguard/v2 v2.2.0
github.com/alecthomas/go-check-sumtype v0.2.0
github.com/alecthomas/go-check-sumtype v0.3.1
github.com/alexkohler/nakedret/v2 v2.0.5
github.com/alexkohler/prealloc v1.0.0
github.com/alingse/asasalint v0.0.11
Expand Down
12 changes: 6 additions & 6 deletions go.sum

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

5 changes: 5 additions & 0 deletions jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,11 @@
"description": "Presence of `default` case in switch statements satisfies exhaustiveness, if all members are not listed.",
"type": "boolean",
"default": true
},
"include-shared-interfaces": {
"description": "Include shared interfaces in the exhaustiviness check.",
"type": "boolean",
"default": false
}
}
},
Expand Down
1 change: 1 addition & 0 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ type GinkgoLinterSettings struct {

type GoChecksumTypeSettings struct {
DefaultSignifiesExhaustive bool `mapstructure:"default-signifies-exhaustive"`
IncludeSharedInterfaces bool `mapstructure:"include-shared-interfaces"`
}

type GocognitSettings struct {
Expand Down
8 changes: 6 additions & 2 deletions pkg/golinters/gochecksumtype/gochecksumtype.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,13 @@ func runGoCheckSumType(pass *analysis.Pass, settings *config.GoChecksumTypeSetti
TypesInfo: pass.TypesInfo,
}

cfg := gochecksumtype.Config{
DefaultSignifiesExhaustive: settings.DefaultSignifiesExhaustive,
IncludeSharedInterfaces: settings.IncludeSharedInterfaces,
}

var unknownError error
errors := gochecksumtype.Run([]*packages.Package{pkg},
gochecksumtype.Config{DefaultSignifiesExhaustive: settings.DefaultSignifiesExhaustive})
errors := gochecksumtype.Run([]*packages.Package{pkg}, cfg)
for _, err := range errors {
err, ok := err.(gochecksumtype.Error)
if !ok {
Expand Down
Loading