Skip to content

Commit 819ab93

Browse files
authored
docs: update wsl documentation (#4846)
1 parent e72c4b7 commit 819ab93

File tree

2 files changed

+82
-46
lines changed

2 files changed

+82
-46
lines changed

.golangci.next.reference.yml

+41-23
Original file line numberDiff line numberDiff line change
@@ -2476,59 +2476,77 @@ linters-settings:
24762476
- ^(?i)c(?-i)ach(ing|e)
24772477

24782478
wsl:
2479-
# See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for documentation of available settings.
2480-
# These are the defaults for `golangci-lint`.
2481-
2482-
# Do strict checking when assigning from append (x = append(x, y)). If
2483-
# this is set to true - the append call must append either a variable
2479+
# Do strict checking when assigning from append (x = append(x, y)).
2480+
# If this is set to true - the append call must append either a variable
24842481
# assigned, called or used on the line above.
2485-
strict-append: true
2482+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#strict-append
2483+
# Default: true
2484+
strict-append: false
24862485

24872486
# Allows assignments to be cuddled with variables used in calls on
24882487
# line above and calls to be cuddled with assignments of variables
24892488
# used in call on line above.
2490-
allow-assign-and-call: true
2489+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-call
2490+
# Default: true
2491+
allow-assign-and-call: false
24912492

24922493
# Allows assignments to be cuddled with anything.
2493-
allow-assign-and-anything: false
2494+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-anything
2495+
# Default: false
2496+
allow-assign-and-anything: true
24942497

24952498
# Allows cuddling to assignments even if they span over multiple lines.
2496-
allow-multiline-assign: true
2499+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-multiline-assign
2500+
# Default: true
2501+
allow-multiline-assign: false
24972502

2498-
# If the number of lines in a case block is equal to or lager than this
2499-
# number, the case *must* end white a newline.
2500-
force-case-trailing-whitespace: 0
2503+
# If the number of lines in a case block is equal to or lager than this number,
2504+
# the case *must* end white a newline.
2505+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-case-trailing-whitespace
2506+
# Default: 0
2507+
force-case-trailing-whitespace: 1
25012508

25022509
# Allow blocks to end with comments.
2503-
allow-trailing-comment: false
2510+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-trailing-comment
2511+
# Default: false
2512+
allow-trailing-comment: true
25042513

25052514
# Allow multiple comments in the beginning of a block separated with newline.
2506-
allow-separated-leading-comment: false
2515+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-separated-leading-comment
2516+
# Default: false
2517+
allow-separated-leading-comment: true
25072518

25082519
# Allow multiple var/declaration statements to be cuddled.
2509-
allow-cuddle-declarations: false
2520+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-cuddle-declarations
2521+
# Default: false
2522+
allow-cuddle-declarations: true
25102523

25112524
# A list of call idents that everything can be cuddled with.
2512-
# Defaults to calls looking like locks.
2513-
allow-cuddle-with-calls: [ "Lock", "RLock" ]
2525+
# Defaults: [ "Lock", "RLock" ]
2526+
allow-cuddle-with-calls: [ "Foo", "Bar" ]
25142527

25152528
# AllowCuddleWithRHS is a list of right hand side variables that is allowed
2516-
# to be cuddled with anything. Defaults to assignments or calls looking
2517-
# like unlocks.
2518-
allow-cuddle-with-rhs: [ "Unlock", "RUnlock" ]
2529+
# to be cuddled with anything.
2530+
# Defaults: [ "Unlock", "RUnlock" ]
2531+
allow-cuddle-with-rhs: [ "Foo", "Bar" ]
25192532

25202533
# Causes an error when an If statement that checks an error variable doesn't
25212534
# cuddle with the assignment of that variable.
2522-
force-err-cuddling: false
2535+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-err-cuddling
2536+
# Default: false
2537+
force-err-cuddling: true
25232538

25242539
# When force-err-cuddling is enabled this is a list of names
25252540
# used for error variables to check for in the conditional.
2526-
error-variable-names: [ "err" ]
2541+
# Default: [ "err" ]
2542+
error-variable-names: [ "foo" ]
25272543

25282544
# Causes an error if a short declaration (:=) cuddles with anything other than
25292545
# another short declaration.
25302546
# This logic overrides force-err-cuddling among others.
2531-
force-short-decl-cuddling: false
2547+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-short-decl-cuddling
2548+
# Default: false
2549+
force-short-decl-cuddling: true
25322550

25332551
# The custom section can be used to define linter plugins to be loaded at runtime.
25342552
# See README documentation for more info.

.golangci.reference.yml

+41-23
Original file line numberDiff line numberDiff line change
@@ -2462,59 +2462,77 @@ linters-settings:
24622462
- ^(?i)c(?-i)ach(ing|e)
24632463

24642464
wsl:
2465-
# See https://github.com/bombsimon/wsl/blob/master/doc/configuration.md for documentation of available settings.
2466-
# These are the defaults for `golangci-lint`.
2467-
2468-
# Do strict checking when assigning from append (x = append(x, y)). If
2469-
# this is set to true - the append call must append either a variable
2465+
# Do strict checking when assigning from append (x = append(x, y)).
2466+
# If this is set to true - the append call must append either a variable
24702467
# assigned, called or used on the line above.
2471-
strict-append: true
2468+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#strict-append
2469+
# Default: true
2470+
strict-append: false
24722471

24732472
# Allows assignments to be cuddled with variables used in calls on
24742473
# line above and calls to be cuddled with assignments of variables
24752474
# used in call on line above.
2476-
allow-assign-and-call: true
2475+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-call
2476+
# Default: true
2477+
allow-assign-and-call: false
24772478

24782479
# Allows assignments to be cuddled with anything.
2479-
allow-assign-and-anything: false
2480+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-assign-and-anything
2481+
# Default: false
2482+
allow-assign-and-anything: true
24802483

24812484
# Allows cuddling to assignments even if they span over multiple lines.
2482-
allow-multiline-assign: true
2485+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-multiline-assign
2486+
# Default: true
2487+
allow-multiline-assign: false
24832488

2484-
# If the number of lines in a case block is equal to or lager than this
2485-
# number, the case *must* end white a newline.
2486-
force-case-trailing-whitespace: 0
2489+
# If the number of lines in a case block is equal to or lager than this number,
2490+
# the case *must* end white a newline.
2491+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-case-trailing-whitespace
2492+
# Default: 0
2493+
force-case-trailing-whitespace: 1
24872494

24882495
# Allow blocks to end with comments.
2489-
allow-trailing-comment: false
2496+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-trailing-comment
2497+
# Default: false
2498+
allow-trailing-comment: true
24902499

24912500
# Allow multiple comments in the beginning of a block separated with newline.
2492-
allow-separated-leading-comment: false
2501+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-separated-leading-comment
2502+
# Default: false
2503+
allow-separated-leading-comment: true
24932504

24942505
# Allow multiple var/declaration statements to be cuddled.
2495-
allow-cuddle-declarations: false
2506+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#allow-cuddle-declarations
2507+
# Default: false
2508+
allow-cuddle-declarations: true
24962509

24972510
# A list of call idents that everything can be cuddled with.
2498-
# Defaults to calls looking like locks.
2499-
allow-cuddle-with-calls: [ "Lock", "RLock" ]
2511+
# Defaults: [ "Lock", "RLock" ]
2512+
allow-cuddle-with-calls: [ "Foo", "Bar" ]
25002513

25012514
# AllowCuddleWithRHS is a list of right hand side variables that is allowed
2502-
# to be cuddled with anything. Defaults to assignments or calls looking
2503-
# like unlocks.
2504-
allow-cuddle-with-rhs: [ "Unlock", "RUnlock" ]
2515+
# to be cuddled with anything.
2516+
# Defaults: [ "Unlock", "RUnlock" ]
2517+
allow-cuddle-with-rhs: [ "Foo", "Bar" ]
25052518

25062519
# Causes an error when an If statement that checks an error variable doesn't
25072520
# cuddle with the assignment of that variable.
2508-
force-err-cuddling: false
2521+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-err-cuddling
2522+
# Default: false
2523+
force-err-cuddling: true
25092524

25102525
# When force-err-cuddling is enabled this is a list of names
25112526
# used for error variables to check for in the conditional.
2512-
error-variable-names: [ "err" ]
2527+
# Default: [ "err" ]
2528+
error-variable-names: [ "foo" ]
25132529

25142530
# Causes an error if a short declaration (:=) cuddles with anything other than
25152531
# another short declaration.
25162532
# This logic overrides force-err-cuddling among others.
2517-
force-short-decl-cuddling: false
2533+
# https://github.com/bombsimon/wsl/blob/master/doc/configuration.md#force-short-decl-cuddling
2534+
# Default: false
2535+
force-short-decl-cuddling: true
25182536

25192537
# The custom section can be used to define linter plugins to be loaded at runtime.
25202538
# See README documentation for more info.

0 commit comments

Comments
 (0)