chore(lint): enable nlreturn

This commit is contained in:
Luca Burgazzoli 2024-05-16 15:40:51 +02:00
parent b3fd8910d3
commit 7ab9424459
No known key found for this signature in database
GPG Key ID: 238C46A40510C1A9
2 changed files with 3 additions and 1 deletions

View File

@ -38,6 +38,8 @@ linters-settings:
wsl: wsl:
allow-cuddle-declarations: true allow-cuddle-declarations: true
allow-separated-leading-comment: true allow-separated-leading-comment: true
nlreturn:
block-size: 2
linters: linters:
enable-all: true enable-all: true
disable: disable:
@ -71,7 +73,6 @@ linters:
- maligned - maligned
- nakedret - nakedret
- nilnil - nilnil
- nlreturn
- nosnakecase - nosnakecase
- paralleltest - paralleltest
- testpackage - testpackage

View File

@ -67,6 +67,7 @@ func (gc *GC) deleteEachOf(ctx context.Context, c *client.Client, selector label
if err := c.List(ctx, &items, options...); err != nil { if err := c.List(ctx, &items, options...); err != nil {
if k8serrors.IsForbidden(err) { if k8serrors.IsForbidden(err) {
gc.l.Info("cannot gc, forbidden", "gvk", GVK.String()) gc.l.Info("cannot gc, forbidden", "gvk", GVK.String())
continue continue
} }