wisedog/ladybug

View on GitHub
controllers/util.go

Summary

Maintainability
A
1 hr
Test Coverage

Function ValidationFailAndRedirect has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

func ValidationFailAndRedirect(c *interfacer.AppContext, w http.ResponseWriter,
    r *http.Request, errorMap map[string]string, url string, value interface{}) {
Severity: Minor
Found in controllers/util.go - About 45 mins to fix

    Function logAndRenderJSONWithStatus has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func logAndRenderJSONWithStatus(w http.ResponseWriter, data interface{}, statusCode int,
        logType int, module, msgType, msg string) error {
    Severity: Minor
    Found in controllers/util.go - About 35 mins to fix

      if block ends with a return statement, so drop this else and outdent its block
      Open

              } else {
      Severity: Minor
      Found in controllers/util.go by golint

      There are no issues that match your filters.

      Category
      Status