Skip to content

Commit 7b7b80a

Browse files
committed
Disable errorf option for errorlint.
The errorf option forces developers to expose errors as part of their package APIs. This has the effect of forcing any use of a third party or other package's errors to become part of a package API. Signed-off-by: Chris Doherty <[email protected]>
1 parent e81c309 commit 7b7b80a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ linters-settings:
3131
errorlint:
3232
# these are still common in Go: for instance, exit errors.
3333
asserts: false
34+
# Forcing %w in error wrapping forces authors to make errors part of their package APIs. The decision to make
35+
# an error part of a package API should be a concious decision by the author.
36+
# Also see Hyrums Law.
37+
errorf: false
3438

3539
exhaustive:
3640
default-signifies-exhaustive: true

0 commit comments

Comments
 (0)