Skip to content

build(deps): bump github.com/bombsimon/wsl/v4 from 4.5.0 to 4.6.0 #5483

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
6 changes: 6 additions & 0 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3788,6 +3788,12 @@ linters:
# Defaults: [ "Unlock", "RUnlock" ]
allow-cuddle-with-rhs: [ "Foo", "Bar" ]

# Allow cuddling with any block as long as the variable is used somewhere in
# the block.
# https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#allow-cuddle-used-in-block
# Default: false
allow-cuddle-used-in-block: true

# Causes an error when an If statement that checks an error variable doesn't
# cuddle with the assignment of that variable.
# https://github.com/bombsimon/wsl/blob/HEAD/doc/configuration.md#force-err-cuddling
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/ashanbrown/makezero v1.2.0
github.com/bkielbasa/cyclop v1.2.3
github.com/blizzy78/varnamelen v0.8.0
github.com/bombsimon/wsl/v4 v4.5.0
github.com/bombsimon/wsl/v4 v4.6.0
github.com/breml/bidichk v0.3.2
github.com/breml/errchkjson v0.4.0
github.com/butuzov/ireturn v0.3.1
Expand Down
4 changes: 2 additions & 2 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.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3954,6 +3954,11 @@
"type": "string"
}
},
"allow-cuddle-used-in-block": {
"description": "Allow cuddling with any block as long as the variable is used somewhere in the block",
"type": "boolean",
"default": false
},
"allow-multiline-assign": {
"description": "Allow multiline assignments to be cuddled.",
"type": "boolean",
Expand Down
5 changes: 5 additions & 0 deletions jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3954,6 +3954,11 @@
"type": "string"
}
},
"allow-cuddle-used-in-block": {
"description": "Allow cuddling with any block as long as the variable is used somewhere in the block",
"type": "boolean",
"default": false
},
"allow-multiline-assign": {
"description": "Allow multiline assignments to be cuddled.",
"type": "boolean",
Expand Down

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

2 changes: 2 additions & 0 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ var defaultLintersSettings = LintersSettings{
AllowCuddleDeclaration: false,
AllowCuddleWithCalls: []string{"Lock", "RLock"},
AllowCuddleWithRHS: []string{"Unlock", "RUnlock"},
AllowCuddleUsedInBlock: false,
ForceCuddleErrCheckAndAssign: false,
ErrorVariableNames: []string{"err"},
ForceExclusiveShortDeclarations: false,
Expand Down Expand Up @@ -972,6 +973,7 @@ type WSLSettings struct {
AllowCuddleDeclaration bool `mapstructure:"allow-cuddle-declarations"`
AllowCuddleWithCalls []string `mapstructure:"allow-cuddle-with-calls"`
AllowCuddleWithRHS []string `mapstructure:"allow-cuddle-with-rhs"`
AllowCuddleUsedInBlock bool `mapstructure:"allow-cuddle-used-in-block"`
ForceCuddleErrCheckAndAssign bool `mapstructure:"force-err-cuddling"`
ErrorVariableNames []string `mapstructure:"error-variable-names"`
ForceExclusiveShortDeclarations bool `mapstructure:"force-short-decl-cuddling"`
Expand Down
1 change: 1 addition & 0 deletions pkg/golinters/wsl/wsl.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func New(settings *config.WSLSettings) *goanalysis.Linter {
AllowCuddleWithCalls: settings.AllowCuddleWithCalls,
AllowCuddleWithRHS: settings.AllowCuddleWithRHS,
ForceCuddleErrCheckAndAssign: settings.ForceCuddleErrCheckAndAssign,
AllowCuddleUsedInBlock: settings.AllowCuddleUsedInBlock,
ErrorVariableNames: settings.ErrorVariableNames,
ForceExclusiveShortDeclarations: settings.ForceExclusiveShortDeclarations,
IncludeGenerated: true, // force to true because golangci-lint already have a way to filter generated files.
Expand Down
Loading