From 199b8d90b3bc78529a367855618954fc5538a5b3 Mon Sep 17 00:00:00 2001 From: Jens Neuse Date: Tue, 31 Oct 2023 14:16:35 +0100 Subject: [PATCH] chore: fix ci --- v2/pkg/astjson/astjson.go | 1 + v2/pkg/engine/resolve/v2load.go | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/v2/pkg/astjson/astjson.go b/v2/pkg/astjson/astjson.go index c3f1f87eb..4d0636370 100644 --- a/v2/pkg/astjson/astjson.go +++ b/v2/pkg/astjson/astjson.go @@ -424,6 +424,7 @@ func (j *JSON) parseArray(array []byte, start int) (ref int, parseArrayErr error Kind: NodeKindArray, ArrayValues: j.getIntSlice(), } + // nolint:staticcheck _, err := jsonparser.ArrayEach(array, func(value []byte, dataType jsonparser.ValueType, offset int, err error) { storageStart := start + offset if dataType == jsonparser.String { diff --git a/v2/pkg/engine/resolve/v2load.go b/v2/pkg/engine/resolve/v2load.go index 5202d1f78..03a3a5a52 100644 --- a/v2/pkg/engine/resolve/v2load.go +++ b/v2/pkg/engine/resolve/v2load.go @@ -383,7 +383,7 @@ func (l *V2Loader) loadEntityFetch(ctx context.Context, fetch *EntityFetch, item err = fetch.Input.Item.Render(l.ctx, itemData.Bytes(), item) if err != nil { if fetch.Input.SkipErrItem { - err = nil + err = nil // nolint:ineffassign // skip fetch on render item error return nil } @@ -449,12 +449,15 @@ WithNextItem: for i, item := range items { itemData.Reset() err = l.data.PrintNode(l.data.Nodes[item], itemData) + if err != nil { + return errors.WithStack(err) + } for j := range fetch.Input.Items { itemInput.Reset() err = fetch.Input.Items[j].Render(l.ctx, itemData.Bytes(), itemInput) if err != nil { if fetch.Input.SkipErrItems { - err = nil + err = nil // nolint:ineffassign res.batchStats[i] = append(res.batchStats[i], -1) continue }