devrelcollective/xela

View on GitHub
actions/proposals.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method ProposalsResource.Update has 6 return statements (exceeds 4 allowed).
Open

func (v ProposalsResource) Update(c buffalo.Context) error {
    // Get the DB connection from the context
    tx, ok := c.Value("tx").(*pop.Connection)
    if !ok {
        return errors.WithStack(errors.New("no transaction found"))
Severity: Major
Found in actions/proposals.go - About 40 mins to fix

    Method ProposalsResource.Edit has 6 return statements (exceeds 4 allowed).
    Open

    func (v ProposalsResource) Edit(c buffalo.Context) error {
        // Get the DB connection from the context
        //     tx, ok := c.Value("tx").(*pop.Connection)
        //     if !ok {
        //         return errors.WithStack(errors.New("no transaction found"))
    Severity: Major
    Found in actions/proposals.go - About 40 mins to fix

      Method ProposalsResource.New has 5 return statements (exceeds 4 allowed).
      Open

      func (v ProposalsResource) New(c buffalo.Context) error {
          //     return c.Render(200, r.Auto(c, &models.Proposal{}))
          // }
      
          // func NewProposal(c buffalo.Context) error {
      Severity: Major
      Found in actions/proposals.go - About 35 mins to fix

        Method ProposalsResource.Create has 5 return statements (exceeds 4 allowed).
        Open

        func (v ProposalsResource) Create(c buffalo.Context) error {
        
            // Get the DB connection from the context
            tx, ok := c.Value("tx").(*pop.Connection)
            if !ok {
        Severity: Major
        Found in actions/proposals.go - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status