Skip to content
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

build(deps): bump github.com/firefart/nonamedreturns from 1.0.2 to 1.0.4 #2944

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .golangci.reference.yml
Expand Up @@ -1159,9 +1159,9 @@ linters-settings:
require-specific: true

nonamedreturns:
# Do not complain about named error, if it is assigned inside defer.
# Report named error if it is assigned inside defer.
# Default: false
allow-error-in-defer: true
report-error-in-defer: true

paralleltest:
# Ignore missing calls to `t.Parallel()` and only report incorrect uses of it.
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Expand Up @@ -24,7 +24,7 @@ require (
github.com/denis-tingaikin/go-header v0.4.3
github.com/esimonov/ifshort v1.0.4
github.com/fatih/color v1.13.0
github.com/firefart/nonamedreturns v1.0.2
github.com/firefart/nonamedreturns v1.0.4
github.com/fzipp/gocyclo v0.6.0
github.com/go-critic/go-critic v0.6.3
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b
Expand Down Expand Up @@ -170,7 +170,7 @@ require (
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d // indirect
golang.org/x/sys v0.0.0-20220624220833-87e55d714810 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/ini.v1 v1.66.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.

2 changes: 1 addition & 1 deletion pkg/config/linters_settings.go
Expand Up @@ -486,7 +486,7 @@ type NoLintLintSettings struct {
}

type NoNamedReturnsSettings struct {
AllowErrorInDefer bool `mapstructure:"allow-error-in-defer"`
ReportErrorInDefer bool `mapstructure:"report-error-in-defer"`
}
type ParallelTestSettings struct {
IgnoreMissing bool `mapstructure:"ignore-missing"`
Expand Down
4 changes: 2 additions & 2 deletions pkg/golinters/nonamedreturns.go
Expand Up @@ -15,7 +15,7 @@ func NewNoNamedReturns(settings *config.NoNamedReturnsSettings) *goanalysis.Lint
if settings != nil {
cfg = map[string]map[string]interface{}{
a.Name: {
analyzer.FlagAllowErrorInDefer: settings.AllowErrorInDefer,
analyzer.FlagReportErrorInDefer: settings.ReportErrorInDefer,
},
}
}
Expand All @@ -25,5 +25,5 @@ func NewNoNamedReturns(settings *config.NoNamedReturnsSettings) *goanalysis.Lint
a.Doc,
[]*analysis.Analyzer{a},
cfg,
).WithLoadMode(goanalysis.LoadModeSyntax)
).WithLoadMode(goanalysis.LoadModeTypesInfo)
}
1 change: 1 addition & 0 deletions pkg/lint/lintersdb/manager.go
Expand Up @@ -627,6 +627,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {

linter.NewConfig(golinters.NewNoNamedReturns(noNamedReturnsCfg)).
WithSince("v1.46.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetStyle).
WithURL("https://github.com/firefart/nonamedreturns"),

Expand Down
2 changes: 1 addition & 1 deletion test/testdata/configs/nonamedreturns.yml
@@ -1,3 +1,3 @@
linters-settings:
nonamedreturns:
allow-error-in-defer: true
report-error-in-defer: true