Skip to content

Commit

Permalink
Merge branch 'main' into fix-find-all-method-return-type
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffail authored Mar 21, 2023
2 parents c98237e + 35b36d3 commit 6bd6101
Show file tree
Hide file tree
Showing 26 changed files with 533 additions and 163 deletions.
17 changes: 8 additions & 9 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,22 @@ linters-settings:
linters:
disable-all: true
enable:
# Default linters reported by `golangci-lint help linters` in v1.41.1
# Disabled for Go 1.18
- gosimple
- staticcheck
- unused
# Default linters reported by `golangci-lint help linters` in v1.52.0
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
# Extra linters:
# Disabled for Go 1.18
# - wastedassign
- wastedassign
- stylecheck
- gofmt
- goimports
- gocritic
- revive
# gocritic is very slow (golangci-lint v1.52.0)
# - gocritic
# - revive
- unconvert
- durationcheck
- depguard
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,24 @@ All notable changes to this project will be documented in this file.

## Unreleased

### Fixed

- The `find_all` bloblang method no longer produces results that are of an `unknown` type.

## 4.13.0 - 2023-03-15

### Added

- Fix vulnerability [GO-2023-1571](https://pkg.go.dev/vuln/GO-2023-1571)
- New `nats_kv` processor, input and output.
- Field `partition` added to the `kafka_franz` output, allowing for manual partitioning.

### Fixed

- The `broker` output with the pattern `fan_out_sequential` will no longer abandon in-flight requests that are error blocked until the full shutdown timeout has occurred.
- The `broker` input no longer reports itself as unavailable when a child input has intentionally closed.
- The `find_all` bloblang method no longer produces results that are of an `unknown` type.
- Config unit tests that check for structured data should no longer fail in all cases.
- The `http_server` input with a custom address now supports path variables.

## 4.12.1 - 2023-02-23

Expand Down
22 changes: 22 additions & 0 deletions config/test/structured_metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
input:
stdin:
codec: lines
pipeline:
processors:
- mapping: |
meta foo = { "a": "hello" }
meta bar = { "b": { "c": "hello" } }
meta baz = [ { "a": "hello" }, { "b": { "c": "hello" } } ]
output:
stdout:
codec: lines

tests:
- name: Should not fail
input_batch:
- content: hello
output_batches:
- - metadata_equals:
foo: { "a": "hello" }
bar: { "b": { "c": "hello" } }
baz: [ { "a": "hello" }, { "b": { "c": "hello" } } ]
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ require (
github.com/itchyny/timefmt-go v0.1.5
github.com/jhump/protoreflect v1.14.1
github.com/jmespath/go-jmespath v0.4.0
github.com/klauspost/compress v1.15.15
github.com/klauspost/compress v1.16.3
github.com/lib/pq v1.10.4
github.com/linkedin/goavro/v2 v2.12.0
github.com/matoous/go-nanoid/v2 v2.0.0
Expand Down Expand Up @@ -91,7 +91,7 @@ require (
github.com/stretchr/testify v1.8.1
github.com/tetratelabs/wazero v1.0.0-pre.9
github.com/tilinna/z85 v1.0.0
github.com/twmb/franz-go v1.12.1
github.com/twmb/franz-go v1.13.0
github.com/twmb/franz-go/pkg/kmsg v1.4.0
github.com/urfave/cli/v2 v2.11.0
github.com/vmihailenco/msgpack/v5 v5.3.5
Expand All @@ -110,11 +110,11 @@ require (
go.opentelemetry.io/otel/sdk v1.13.0
go.opentelemetry.io/otel/trace v1.13.0
go.uber.org/multierr v1.9.0
golang.org/x/crypto v0.6.0
golang.org/x/net v0.6.0
golang.org/x/crypto v0.7.0
golang.org/x/net v0.8.0
golang.org/x/oauth2 v0.5.0
golang.org/x/sync v0.1.0
golang.org/x/text v0.7.0
golang.org/x/text v0.8.0
google.golang.org/api v0.103.0
google.golang.org/grpc v1.53.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
Expand Down Expand Up @@ -272,8 +272,8 @@ require (
go.uber.org/atomic v1.10.0 // indirect
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/term v0.5.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/tools v0.6.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gonum.org/v1/gonum v0.11.0 // indirect
Expand Down
31 changes: 14 additions & 17 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -702,9 +702,8 @@ github.com/klauspost/compress v1.10.8/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs
github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
github.com/klauspost/compress v1.15.15 h1:EF27CXIuDsYJ6mmvtBRlEuB2UVOqHG1tAXgZ7yIO+lw=
github.com/klauspost/compress v1.15.15/go.mod h1:ZcK2JAFqKOpnBlxcLsJzYfrS9X1akm9fHZNnD9+Vo/4=
github.com/klauspost/compress v1.16.3 h1:XuJt9zzcnaz6a16/OU53ZjWp/v7/42WcR5t2a0PcNQY=
github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
Expand Down Expand Up @@ -872,7 +871,6 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi
github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM=
github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc=
github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4=
github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA=
Expand Down Expand Up @@ -1043,8 +1041,8 @@ github.com/trivago/grok v1.0.0/go.mod h1:9t59xLInhrncYq9a3J7488NgiBZi5y5yC7bss+w
github.com/trivago/tgo v1.0.7 h1:uaWH/XIy9aWYWpjm2CU3RpcqZXmX2ysQ9/Go+d9gyrM=
github.com/trivago/tgo v1.0.7/go.mod h1:w4dpD+3tzNIIiIfkWWa85w5/B77tlvdZckQ+6PkFnhc=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/twmb/franz-go v1.12.1 h1:8lWT8q0spL40Nfw6eonJ8OoPGLvF9arvadRRmcSiu9Y=
github.com/twmb/franz-go v1.12.1/go.mod h1:Ofc5tSSUJKLmpRNUYSejUsAZKYAHDHywTS322KWdChQ=
github.com/twmb/franz-go v1.13.0 h1:J4VyTXVlOhiCDCXS56ut2ZRAylaimPXnIqtCq9Wlfbw=
github.com/twmb/franz-go v1.13.0/go.mod h1:jm/FtYxmhxDTN0gNSb26XaJY0irdSVcsckLiR5tQNMk=
github.com/twmb/franz-go/pkg/kmsg v1.4.0 h1:tbp9hxU6m8qZhQTlpGiaIJOm4BXix5lsuEZ7K00dF0s=
github.com/twmb/franz-go/pkg/kmsg v1.4.0/go.mod h1:SxG/xJKhgPu25SamAq0rrucfp7lbzCpEXOC+vH/ELrY=
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
Expand Down Expand Up @@ -1173,9 +1171,8 @@ golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0
golang.org/x/crypto v0.0.0-20220315160706-3147a52a75dd/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.0.0-20220817201139-bc19a97f63c8/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A=
golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand Down Expand Up @@ -1286,8 +1283,8 @@ golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.0.0-20220725212005-46097bf591d3/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM=
golang.org/x/net v0.6.0 h1:L4ZwwTvKW9gr0ZMS1yrHD9GZhIuVjOBBnaKH+SPQK0Q=
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ=
golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -1407,13 +1404,13 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0 h1:n2a8QNdAb0sZNpU9R1ALUXBbY+w51fCQDN+7EdxNBsY=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw=
golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand All @@ -1423,8 +1420,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68=
golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
Expand Down
10 changes: 2 additions & 8 deletions internal/checkpoint/capped.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ package checkpoint
import (
"context"
"sync"

"github.com/benthosdev/benthos/v4/internal/component"
)

// Capped receives an ordered feed of integer based offsets being tracked, and
Expand Down Expand Up @@ -51,18 +49,14 @@ func (c *Capped[T]) Track(ctx context.Context, payload T, batchSize int64) (func
defer cancel()
go func() {
<-ctx.Done()
c.cond.L.Lock()
c.cond.Broadcast()
c.cond.L.Unlock()
}()

pending := c.t.Pending()
for pending > 0 && pending+batchSize > c.cap {
c.cond.Wait()
select {
case <-ctx.Done():
return nil, component.ErrTimeout
default:
if err := ctx.Err(); err != nil {
return nil, err
}
pending = c.t.Pending()
}
Expand Down
13 changes: 6 additions & 7 deletions internal/checkpoint/uncapped.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package checkpoint
// Also keeps track of the logical size of the unresolved sequence, which allows
// for limiting the number of pending checkpoints.
type Uncapped[T any] struct {
positionOffset int64
checkpoint *T
checkpointPosition int64
checkpoint *T

start, end *node[T]
}
Expand All @@ -35,6 +35,8 @@ func (t *Uncapped[T]) Track(payload T, batchSize int64) func() *T {
newNode.prev = t.end
newNode.position += t.end.position
t.end.next = newNode
} else {
newNode.position += t.checkpointPosition
}

t.end = newNode
Expand All @@ -47,17 +49,14 @@ func (t *Uncapped[T]) Track(payload T, batchSize int64) func() *T {
} else {
tmp := newNode.payload
t.checkpoint = &tmp
t.positionOffset = newNode.position
t.checkpointPosition = newNode.position
t.start = newNode.next
}

if newNode.next != nil {
newNode.next.prev = newNode.prev
} else {
t.end = newNode.prev
if t.end == nil {
t.positionOffset = 0
}
}
return t.checkpoint
}
Expand All @@ -68,7 +67,7 @@ func (t *Uncapped[T]) Pending() int64 {
if t.end == nil {
return 0
}
return t.end.position - t.positionOffset
return t.end.position - t.checkpointPosition
}

// Highest returns the payload of the highest resolved checkpoint.
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ func Run() {
Value: false,
Usage: "display version info, then exit",
},
&cli.StringFlag{
&cli.StringSliceFlag{
Name: "env-file",
Aliases: []string{"e"},
Value: "",
Value: cli.NewStringSlice(),
Usage: "import environment variables from a dotenv file",
},
&cli.StringFlag{
Expand Down Expand Up @@ -186,7 +186,7 @@ Either run Benthos as a stream processor or choose a command:
benthos -r "./production/*.yaml" -c ./config.yaml`[1:],
Flags: flags,
Before: func(c *cli.Context) error {
if dotEnvFile := c.String("env-file"); dotEnvFile != "" {
for _, dotEnvFile := range c.StringSlice("env-file") {
dotEnvBytes, err := ifs.ReadFile(ifs.OS(), dotEnvFile)
if err != nil {
fmt.Printf("Failed to read dotenv file: %v\n", err)
Expand Down
6 changes: 3 additions & 3 deletions internal/cli/test/condition.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,11 @@ func (c *ConditionsMap) UnmarshalYAML(value *yaml.Node) error {
}
cond = val
case "metadata_equals":
val := MetadataEqualsCondition{}
if err := v.Decode(&val); err != nil {
root := map[string]any{}
if err := v.Decode(&root); err != nil {
return fmt.Errorf("line %v: %v", v.Line, err)
}
cond = val
cond = MetadataEqualsCondition(root)
default:
return fmt.Errorf("line %v: message part condition type not recognised: %v", v.Line, k)
}
Expand Down
6 changes: 4 additions & 2 deletions internal/docs/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,9 @@ func (f FieldSpec) getLintFunc() LintFunc {
}
if f.Interpolated {
if fn != nil {
innerFn := fn
fn = func(ctx LintContext, line, col int, value any) []Lint {
lints := f.customLintFn(ctx, line, col, value)
lints := innerFn(ctx, line, col, value)
moreLints := LintBloblangField(ctx, line, col, value)
return append(lints, moreLints...)
}
Expand All @@ -445,8 +446,9 @@ func (f FieldSpec) getLintFunc() LintFunc {
}
if f.Bloblang {
if fn != nil {
innerFn := fn
fn = func(ctx LintContext, line, col int, value any) []Lint {
lints := f.customLintFn(ctx, line, col, value)
lints := innerFn(ctx, line, col, value)
moreLints := LintBloblangMapping(ctx, line, col, value)
return append(lints, moreLints...)
}
Expand Down
Loading

0 comments on commit 6bd6101

Please sign in to comment.