voicera/gooseberry

View on GitHub

Showing 4 of 4 total issues

Method client.Do has 6 return statements (exceeds 4 allowed).
Open

func (c *client) Do(
    method string, url string, body interface{}, result interface{}) (*http.Response, error) {
    request, err := c.CreateRequest(method, c.resolveURL(url), body)
    if err != nil {
        return nil, err
Severity: Major
Found in web/rest/rest.go - About 40 mins to fix

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

        method string, url string, body interface{}, encode bodyEncoder, contentType string) (*http.Request, error) {
    Severity: Minor
    Found in web/rest/rest.go - About 35 mins to fix

      Method AggregateError.Error has 5 return statements (exceeds 4 allowed).
      Open

      func (aggregateError *AggregateError) Error() string {
          buffer := bufferPool.Get().(*bytes.Buffer)
          buffer.Reset()
          if aggregateError.Header != "" {
              if _, err := buffer.WriteString(aggregateError.Header); err != nil {
      Severity: Major
      Found in errors/errors.go - About 35 mins to fix

        Function inspect has 5 return statements (exceeds 4 allowed).
        Open

        func inspect(node ast.Node) bool {
            call, ok := node.(*ast.CallExpr)
            if !ok {
                return true // continue parsing down the AST
            }
        Severity: Major
        Found in scripts/inspector/main.go - About 35 mins to fix
          Severity
          Category
          Status
          Source
          Language