vorteil/direktiv

View on GitHub
pkg/flow/memory.go

Summary

Maintainability
A
3 hrs
Test Coverage

Method engine.getInstanceMemory has 60 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (engine *engine) getInstanceMemory(ctx context.Context, id uuid.UUID) (*instanceMemory, error) {
    tx, err := engine.flow.beginSQLTx(ctx, &sql.TxOptions{
        Isolation: sql.LevelSerializable,
    })
    if err != nil {
Severity: Minor
Found in pkg/flow/memory.go - About 1 hr to fix

    Method engine.getInstanceMemory has 11 return statements (exceeds 4 allowed).
    Open

    func (engine *engine) getInstanceMemory(ctx context.Context, id uuid.UUID) (*instanceMemory, error) {
        tx, err := engine.flow.beginSQLTx(ctx, &sql.TxOptions{
            Isolation: sql.LevelSerializable,
        })
        if err != nil {
    Severity: Major
    Found in pkg/flow/memory.go - About 1 hr to fix

      Method instanceMemory.flushUpdates has 6 return statements (exceeds 4 allowed).
      Open

      func (im *instanceMemory) flushUpdates(ctx context.Context) error {
          data, err := json.Marshal(im.updateArgs)
          if err != nil {
              panic(err)
          }
      Severity: Major
      Found in pkg/flow/memory.go - About 40 mins to fix

        There are no issues that match your filters.

        Category
        Status