alexkappa/terraform-provider-auth0

View on GitHub

Showing 25 of 69 total issues

Function newClient has 568 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func newClient() *schema.Resource {
    return &schema.Resource{

        Create: createClient,
        Read:   readClient,
Severity: Major
Found in auth0/resource_auth0_client.go - About 2 days to fix

    File resource_auth0_client.go has 872 lines of code (exceeds 500 allowed). Consider refactoring.
    Open

    package auth0
    
    import (
        "net/http"
        "strconv"
    Severity: Major
    Found in auth0/resource_auth0_client.go - About 1 day to fix

      Function newTenant has 231 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func newTenant() *schema.Resource {
          return &schema.Resource{
      
              Create: createTenant,
              Read:   readTenant,
      Severity: Major
      Found in auth0/resource_auth0_tenant.go - About 1 day to fix

        File structure_auth0_connection.go has 676 lines of code (exceeds 500 allowed). Consider refactoring.
        Open

        package auth0
        
        import (
            "log"
        
        
        Severity: Minor
        Found in auth0/structure_auth0_connection.go - About 6 hrs to fix

          Function newLogStream has 166 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func newLogStream() *schema.Resource {
              return &schema.Resource{
          
                  Create: createLogStream,
                  Read:   readLogStream,
          Severity: Major
          Found in auth0/resource_auth0_log_stream.go - About 5 hrs to fix

            Function newAction has 110 lines of code (exceeds 50 allowed). Consider refactoring.
            Open

            func newAction() *schema.Resource {
                return &schema.Resource{
            
                    Create: createAction,
                    Read:   readAction,
            Severity: Major
            Found in auth0/resource_auth0_action.go - About 3 hrs to fix

              Function newUser has 99 lines of code (exceeds 50 allowed). Consider refactoring.
              Open

              func newUser() *schema.Resource {
                  return &schema.Resource{
                      Create: createUser,
                      Read:   readUser,
                      Update: updateUser,
              Severity: Major
              Found in auth0/resource_auth0_user.go - About 2 hrs to fix

                Function newResourceServer has 97 lines of code (exceeds 50 allowed). Consider refactoring.
                Open

                func newResourceServer() *schema.Resource {
                    return &schema.Resource{
                
                        Create: createResourceServer,
                        Read:   readResourceServer,
                Severity: Major
                Found in auth0/resource_auth0_resource_server.go - About 2 hrs to fix

                  Function newGuardian has 91 lines of code (exceeds 50 allowed). Consider refactoring.
                  Open

                  func newGuardian() *schema.Resource {
                      return &schema.Resource{
                  
                          Create: createGuardian,
                          Read:   readGuardian,
                  Severity: Major
                  Found in auth0/resource_auth0_guardian.go - About 2 hrs to fix

                    Function newEmail has 80 lines of code (exceeds 50 allowed). Consider refactoring.
                    Open

                    func newEmail() *schema.Resource {
                        return &schema.Resource{
                    
                            Create: createEmail,
                            Read:   readEmail,
                    Severity: Major
                    Found in auth0/resource_auth0_email.go - About 2 hrs to fix

                      Function Provider has 71 lines of code (exceeds 50 allowed). Consider refactoring.
                      Open

                      func Provider() *schema.Provider {
                          provider := &schema.Provider{
                              Schema: map[string]*schema.Schema{
                                  "domain": {
                                      Type:        schema.TypeString,
                      Severity: Minor
                      Found in auth0/provider.go - About 1 hr to fix

                        Function newBranding has 68 lines of code (exceeds 50 allowed). Consider refactoring.
                        Open

                        func newBranding() *schema.Resource {
                            return &schema.Resource{
                                Create: createBranding,
                                Read:   readBranding,
                                Update: updateBranding,
                        Severity: Minor
                        Found in auth0/resource_auth0_branding.go - About 1 hr to fix

                          Function newOrganization has 66 lines of code (exceeds 50 allowed). Consider refactoring.
                          Open

                          func newOrganization() *schema.Resource {
                              return &schema.Resource{
                          
                                  Create: createOrganization,
                                  Read:   readOrganization,
                          Severity: Minor
                          Found in auth0/resource_auth0_organization.go - About 1 hr to fix

                            Function readGuardian has 59 lines of code (exceeds 50 allowed). Consider refactoring.
                            Open

                            func readGuardian(d *schema.ResourceData, m interface{}) error {
                                api := m.(*management.Management)
                                mt, err := api.Guardian.MultiFactor.Phone.MessageTypes()
                                if err != nil {
                                    return err
                            Severity: Minor
                            Found in auth0/resource_auth0_guardian.go - About 1 hr to fix

                              Function newEmailTemplate has 56 lines of code (exceeds 50 allowed). Consider refactoring.
                              Open

                              func newEmailTemplate() *schema.Resource {
                                  return &schema.Resource{
                              
                                      Create: createEmailTemplate,
                                      Read:   readEmailTemplate,
                              Severity: Minor
                              Found in auth0/resource_auth0_email_template.go - About 1 hr to fix

                                Function newHook has 56 lines of code (exceeds 50 allowed). Consider refactoring.
                                Open

                                func newHook() *schema.Resource {
                                    return &schema.Resource{
                                
                                        Create: createHook,
                                        Read:   readHook,
                                Severity: Minor
                                Found in auth0/resource_auth0_hook.go - About 1 hr to fix

                                  Function expandConnection has 54 lines of code (exceeds 50 allowed). Consider refactoring.
                                  Open

                                  func expandConnection(d ResourceData) *management.Connection {
                                  
                                      c := &management.Connection{
                                          Name:               String(d, "name", IsNewResource()),
                                          DisplayName:        String(d, "display_name"),
                                  Severity: Minor
                                  Found in auth0/structure_auth0_connection.go - About 1 hr to fix

                                    Function newCustomDomain has 53 lines of code (exceeds 50 allowed). Consider refactoring.
                                    Open

                                    func newCustomDomain() *schema.Resource {
                                        return &schema.Resource{
                                    
                                            Create: createCustomDomain,
                                            Read:   readCustomDomain,
                                    Severity: Minor
                                    Found in auth0/resource_auth0_custom_domain.go - About 1 hr to fix

                                      Function readGuardian has 8 return statements (exceeds 4 allowed).
                                      Open

                                      func readGuardian(d *schema.ResourceData, m interface{}) error {
                                          api := m.(*management.Management)
                                          mt, err := api.Guardian.MultiFactor.Phone.MessageTypes()
                                          if err != nil {
                                              return err
                                      Severity: Major
                                      Found in auth0/resource_auth0_guardian.go - About 50 mins to fix

                                        Function deployAction has 6 return statements (exceeds 4 allowed).
                                        Open

                                        func deployAction(d *schema.ResourceData, m interface{}) error {
                                        
                                            if d.Get("deploy").(bool) == true {
                                        
                                                api := m.(*management.Management)
                                        Severity: Major
                                        Found in auth0/resource_auth0_action.go - About 40 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language