Skip to content

Commit 851dd94

Browse files
committed
Update lint config
Signed-off-by: Martin Baillie <[email protected]>
1 parent fe3bfb6 commit 851dd94

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.golangci.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ linters:
7070
- usestdlibvars # detects the possibility to use variables/constants from the Go standard library
7171
- whitespace # detects leading and trailing whitespace
7272
# - wrapcheck # checks that errors returned from external packages are wrapped
73-
- wsl # cuddlemaster
73+
- wsl_v5
7474

7575
linters-settings:
7676
cyclop:
@@ -172,6 +172,10 @@ linters-settings:
172172
# Default: false
173173
all: true
174174

175+
wsl_v5:
176+
allow-first-in-block: true
177+
allow-whole-block: false
178+
branch-max-lines: 2
175179
issues:
176180
# Maximum count of issues with the same text.
177181
# Set to 0 to disable.

github/backend.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,11 @@ func (b *backend) Config(ctx context.Context, s logical.Storage) (*Config, error
126126
// returned closer when finished.
127127
func (b *backend) Client(ctx context.Context, s logical.Storage) (*Client, func(), error) {
128128
b.clientLock.RLock()
129+
129130
if b.client != nil {
130131
return b.client, func() { b.clientLock.RUnlock() }, nil
131132
}
133+
132134
b.clientLock.RUnlock()
133135

134136
// Acquire a globally exclusive lock to close any connections and create a

0 commit comments

Comments
 (0)