firasdarwish/ore

View on GitHub

Showing 2 of 6 total issues

Function BuildContainerDo has 12 return statements (exceeds 4 allowed).
Open

func BuildContainerDo() do.Injector {
    injector := do.New()
    do.ProvideTransient(injector, func(inj do.Injector) (*A, error) {
        return NewA(do.MustInvoke[*B](inj), do.MustInvoke[*C](inj)), nil
    })
Severity: Major
Found in examples/benchperf/internal/DiSamber.go - About 1 hr to fix

    Function RegisterToOreContainer has 11 return statements (exceeds 4 allowed).
    Open

    func RegisterToOreContainer(container *ore.Container) {
        ore.RegisterFuncToContainer(container, ore.Transient, func(ctx context.Context) (*A, context.Context) {
            b, ctx := ore.GetFromContainer[*B](container, ctx)
            c, ctx := ore.GetFromContainer[*C](container, ctx)
            return NewA(b, c), ctx
    Severity: Major
    Found in examples/benchperf/internal/DiOre.go - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language