Skip to content

Commit 8d12f77

Browse files
committed
Enable errorlint linter
See https://github.com/polyfloyd/go-errorlint#examples Signed-off-by: Tom Wieczorek <[email protected]>
1 parent ddee3f9 commit 8d12f77

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.golangci.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ run:
1010

1111
linters:
1212
enable:
13-
- depguard # Checks if package imports are in a list of acceptable packages
14-
- gofmt # Checks whether code was gofmt-ed
15-
- goheader # Checks is file headers matche a given pattern
16-
- revive # Stricter drop-in replacement for golint
13+
- depguard # Checks if package imports are in a list of acceptable packages
14+
- errorlint # Find code that will cause problems with Go's error wrapping scheme
15+
- gofmt # Checks whether code was gofmt-ed
16+
- goheader # Checks is file headers matche a given pattern
17+
- revive # Stricter drop-in replacement for golint
1718

1819
linters-settings:
1920
depguard:

pkg/component/controller/workerconfig/reconciler_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ func TestReconciler_runReconcileLoop(t *testing.T) {
583583

584584
underTest.runReconcileLoop(ctx, updates, nil)
585585

586-
switch ctx.Err() {
586+
switch ctx.Err() { //nolint:errorlint // as per context contract
587587
case context.Canceled:
588588
break // this is the good case
589589
case context.DeadlineExceeded:

0 commit comments

Comments
 (0)