go-auth0/auth0

View on GitHub

Showing 9 of 288 total issues

File connection.go has 621 lines of code (exceeds 500 allowed). Consider refactoring.
Open

package management

import (
    "encoding/json"
    "sort"
Severity: Minor
Found in management/connection.go - About 4 hrs to fix

    UserManager has 22 methods (exceeds 20 allowed). Consider refactoring.
    Open

    type UserManager struct {
        *Management
    }
    Severity: Minor
    Found in management/user.go - About 2 hrs to fix

      OrganizationManager has 21 methods (exceeds 20 allowed). Consider refactoring.
      Open

      type OrganizationManager struct {
          *Management
      }
      Severity: Minor
      Found in management/organization.go - About 2 hrs to fix

        Method Connection.UnmarshalJSON has 59 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (c *Connection) UnmarshalJSON(b []byte) error {
        
            type connection Connection
            type connectionWrapper struct {
                *connection
        Severity: Minor
        Found in management/connection.go - About 1 hr to fix

          Function New has 51 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func New(domain string, options ...ManagementOption) (*Management, error) {
          
              // Ignore the scheme if it was defined in the domain variable. Then prefix
              // with https as its the only scheme supported by the Auth0 API.
              if i := strings.Index(domain, "//"); i != -1 {
          Severity: Minor
          Found in management/management.go - About 1 hr to fix

            Method JobManager.ImportUsers has 7 return statements (exceeds 4 allowed).
            Open

            func (m *JobManager) ImportUsers(j *Job, opts ...RequestOption) error {
            
                var payload bytes.Buffer
                mp := multipart.NewWriter(&payload)
            
            
            Severity: Major
            Found in management/job.go - About 45 mins to fix

              Method UserManager.Link has 6 return statements (exceeds 4 allowed).
              Open

              func (m *UserManager) Link(id string, il *UserIdentityLink, opts ...RequestOption) (uIDs []UserIdentity, err error) {
                  req, err := m.NewRequest("POST", m.URI("users", id, "identities"), il, opts...)
                  if err != nil {
                      return uIDs, err
                  }
              Severity: Major
              Found in management/user.go - About 40 mins to fix

                Method Management.Request has 6 return statements (exceeds 4 allowed).
                Open

                func (m *Management) Request(method, uri string, v interface{}, options ...RequestOption) error {
                
                    req, err := m.NewRequest(method, uri, v, options...)
                    if err != nil {
                        return err
                Severity: Major
                Found in management/management.go - About 40 mins to fix

                  Method AnomalyManager.CheckIP has 5 return statements (exceeds 4 allowed).
                  Open

                  func (m *AnomalyManager) CheckIP(ip string, opts ...RequestOption) (isBlocked bool, err error) {
                      req, err := m.NewRequest("GET", m.URI("anomaly", "blocks", "ips", ip), nil, opts...)
                      if err != nil {
                          return false, err
                      }
                  Severity: Major
                  Found in management/anomaly.go - About 35 mins to fix
                    Severity
                    Category
                    Status
                    Source
                    Language