rollbar/terraform-provider-rollbar

View on GitHub

Showing 8 of 37 total issues

Function resourceNotification has 143 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func resourceNotification() *schema.Resource {
    return &schema.Resource{
        CreateContext: resourceNotificationCreate,
        UpdateContext: resourceNotificationUpdate,
        ReadContext:   resourceNotificationRead,
Severity: Major
Found in rollbar/resource_notification.go - About 4 hrs to fix

    Function resourceIntegraion has 94 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func resourceIntegraion() *schema.Resource {
        return &schema.Resource{
            CreateContext: resourceIntegrationCreate,
            UpdateContext: resourceIntegrationUpdate,
            ReadContext:   resourceIntegrationRead,
    Severity: Major
    Found in rollbar/resource_integration.go - About 2 hrs to fix

      Function resourceTeamUserRead has 62 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func resourceTeamUserRead(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
          teamID, email, err := teamUserFromID(d.Id())
          if err != nil {
              return diag.FromErr(err)
          }
      Severity: Minor
      Found in rollbar/resource_team_user.go - About 1 hr to fix

        Method RollbarAPIClient.ReadIntegration has 54 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (c *RollbarAPIClient) ReadIntegration(integration string) (interface{}, error) {
            c.m.Lock()
            defer c.m.Unlock()
            u := c.BaseURL + pathIntegration
        
        
        Severity: Minor
        Found in client/integration.go - About 1 hr to fix

          Function resourceIntegrationCreateUpdateDelete has 52 lines of code (exceeds 50 allowed). Consider refactoring.
          Open

          func resourceIntegrationCreateUpdateDelete(integration string, bodyMap map[string]interface{}, d *schema.ResourceData, m interface{}, action Action) (zerolog.Logger, diag.Diagnostics) {
              l := log.With().Str("integration", integration).Logger()
              switch action {
              case CREATE:
                  l.Info().Msg("Creating rollbar_integration resource")
          Severity: Minor
          Found in rollbar/resource_integration.go - About 1 hr to fix

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

            func resourceIntegrationCreateUpdateDelete(integration string, bodyMap map[string]interface{}, d *schema.ResourceData, m interface{}, action Action) (zerolog.Logger, diag.Diagnostics) {
            Severity: Minor
            Found in rollbar/resource_integration.go - About 35 mins to fix

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

              func resourceTeamUserRead(_ context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
                  teamID, email, err := teamUserFromID(d.Id())
                  if err != nil {
                      return diag.FromErr(err)
                  }
              Severity: Major
              Found in rollbar/resource_team_user.go - About 35 mins to fix

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

                func dataSourceTeamRead(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics {
                    var team client.Team
                    var l zerolog.Logger
                    teamID, ok := d.GetOk("team_id")
                    c := m.(map[string]*client.RollbarAPIClient)[schemaKeyToken]
                Severity: Major
                Found in rollbar/data_source_team.go - About 35 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language