vorteil/direktiv

View on GitHub
pkg/flow/instance_messages.go

Summary

Maintainability
A
1 hr
Test Coverage

Method engine.enqueueInstanceMessage has 7 return statements (exceeds 4 allowed).
Open

func (engine *engine) enqueueInstanceMessage(ctx context.Context, id uuid.UUID, kind string, data interface{}) error {
    // TODO: should this add state and step data? At some point these fields died so I have removed them.
    payload, err := json.Marshal(map[string]interface{}{
        "type": kind,
        "data": data,
Severity: Major
Found in pkg/flow/instance_messages.go - About 45 mins to fix

    Method engine.handleInstanceMessage has 5 return statements (exceeds 4 allowed).
    Open

    func (engine *engine) handleInstanceMessage(ctx context.Context, im *instanceMemory, msg *instancestore.InstanceMessageData) *states.Transition {
        nsCtx := im.Namespace().WithTags(ctx)
        instanceCtx := im.WithTags(nsCtx)
        nsCtx = tracing.WithTrack(instanceCtx, tracing.BuildNamespaceTrack(im.Namespace().Name))
        ctx = tracing.WithTrack(instanceCtx, tracing.BuildInstanceTrack(im.instance))
    Severity: Major
    Found in pkg/flow/instance_messages.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status