Skip to content

Commit 92dede7

Browse files
committed
Configure optionalfields linter
1 parent 040724b commit 92dede7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.golangci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,15 @@ linters:
2020
isFirstField: Warn
2121
usePatchStrategy: Ignore
2222
useProtobuf: Ignore
23+
optionalfields:
24+
pointers:
25+
preference: WhenRequired
26+
policy: SuggestFix
27+
omitEmpty:
28+
# Ignore missing omitempty so that we can omit the omitempty for discoverability.
29+
# Discoverability is for configuration APIs, generally singletons.
30+
# Refer to the API conventions for when to use discoverability (not our default stance).
31+
policy: Ignore
2332
exclusions:
2433
generated: lax
2534
presets:

0 commit comments

Comments
 (0)