Showing 8 of 37 total issues
Function resourceNotification
has 149 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func resourceNotification() *schema.Resource {
return &schema.Resource{
CreateContext: resourceNotificationCreate,
UpdateContext: resourceNotificationUpdate,
ReadContext: resourceNotificationRead,
Function resourceIntegraion
has 94 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func resourceIntegraion() *schema.Resource {
return &schema.Resource{
CreateContext: resourceIntegrationCreate,
UpdateContext: resourceIntegrationUpdate,
ReadContext: resourceIntegrationRead,
Function resourceTeamUserRead
has 62 lines of code (exceeds 50 allowed). Consider refactoring. Open
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)
}
Method RollbarAPIClient.ReadIntegration
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (c *RollbarAPIClient) ReadIntegration(integration string) (interface{}, error) {
c.m.Lock()
defer c.m.Unlock()
u := c.BaseURL + pathIntegration
Function resourceIntegrationCreateUpdateDelete
has 52 lines of code (exceeds 50 allowed). Consider refactoring. Open
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")
Function resourceIntegrationCreateUpdateDelete
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func resourceIntegrationCreateUpdateDelete(integration string, bodyMap map[string]interface{}, d *schema.ResourceData, m interface{}, action Action) (zerolog.Logger, diag.Diagnostics) {
Function resourceTeamUserRead
has 5 return statements (exceeds 4 allowed). Open
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)
}
Function dataSourceTeamRead
has 5 return statements (exceeds 4 allowed). Open
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]