Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
manicminer committed May 11, 2023
1 parent 84c1080 commit 7e2d1a6
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions internal/helpers/consistency.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func WaitForDeletion(ctx context.Context, f ChangeFunc) error {
}

timeout := time.Until(deadline)
_, err := (&resource.StateChangeConf{
_, err := (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Deleted"},
Timeout: timeout,
Expand Down Expand Up @@ -53,7 +53,7 @@ func WaitForUpdate(ctx context.Context, f ChangeFunc) error {
}

func WaitForUpdateWithTimeout(ctx context.Context, timeout time.Duration, f ChangeFunc) (bool, error) {
res, err := (&resource.StateChangeConf{
res, err := (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: timeout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func administrativeUnitMemberResourceCreate(ctx context.Context, d *schema.Resou
return tf.ErrorDiagF(errors.New("context has no deadline"), "Waiting for member %q to reflect for administrative unit %q", id.MemberId, id.AdministrativeUnitId)
}
timeout := time.Until(deadline)
_, err = (&resource.StateChangeConf{
_, err = (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: timeout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func applicationCertificateResourceCreate(ctx context.Context, d *schema.Resourc

// Wait for the credential to appear in the application manifest, this can take several minutes
timeout, _ := ctx.Deadline()
polledForCredential, err := (&resource.StateChangeConf{
polledForCredential, err := (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: time.Until(timeout),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func applicationFederatedIdentityCredentialResourceCreate(ctx context.Context, d

// Wait for the credential to replicate
timeout, _ := ctx.Deadline()
polledForCredential, err := (&resource.StateChangeConf{
polledForCredential, err := (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: time.Until(timeout),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func applicationPasswordResourceCreate(ctx context.Context, d *schema.ResourceDa

// Wait for the credential to appear in the application manifest, this can take several minutes
timeout, _ := ctx.Deadline()
polledForCredential, err := (&resource.StateChangeConf{
polledForCredential, err := (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: time.Until(timeout),
Expand Down
4 changes: 2 additions & 2 deletions internal/services/applications/applications.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func applicationDisableAppRoles(ctx context.Context, client *msgraph.Application
return fmt.Errorf("context has no deadline")
}
timeout := time.Until(deadline)
_, err = (&resource.StateChangeConf{
_, err = (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Disabled"},
Timeout: timeout,
Expand Down Expand Up @@ -238,7 +238,7 @@ func applicationDisableOauth2PermissionScopes(ctx context.Context, client *msgra
return fmt.Errorf("context has no deadline")
}
timeout := time.Until(deadline)
_, err = (&resource.StateChangeConf{
_, err = (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Disabled"},
Timeout: timeout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ func conditionalAccessPolicyResourceUpdate(ctx context.Context, d *schema.Resour
// in a timeout loop, instead we're hoping that this allows enough time/activity for the update to be reflected.
log.Printf("[DEBUG] Waiting for conditional access policy %q to be updated", d.Id())
timeout, _ := ctx.Deadline()
stateConf := &resource.StateChangeConf{
stateConf := &resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Pending"},
Target: []string{"Done"},
Timeout: time.Until(timeout),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func namedLocationResourceUpdate(ctx context.Context, d *schema.ResourceData, me
base.DisplayName = &displayName
}

var updateRefreshFunc resource.StateRefreshFunc
var updateRefreshFunc resource.StateRefreshFunc //nolint:staticcheck

if v, ok := d.GetOk("ip"); ok {
properties := expandIPNamedLocation(v.([]interface{}))
Expand Down Expand Up @@ -218,7 +218,7 @@ func namedLocationResourceUpdate(ctx context.Context, d *schema.ResourceData, me

log.Printf("[DEBUG] Waiting for named location %q to be updated", d.Id())
timeout, _ := ctx.Deadline()
stateConf := &resource.StateChangeConf{
stateConf := &resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Pending"},
Target: []string{"Updated"},
Timeout: time.Until(timeout),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func directoryRoleAssignmentResourceCreate(ctx context.Context, d *schema.Resour
return tf.ErrorDiagF(errors.New("context has no deadline"), "Waiting for directory role %q assignment to principal %q to take effect", roleId, principalId)
}
timeout := time.Until(deadline)
_, err = (&resource.StateChangeConf{
_, err = (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: timeout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func directoryRoleMemberResourceCreate(ctx context.Context, d *schema.ResourceDa
return tf.ErrorDiagF(errors.New("context has no deadline"), "Waiting for role member %q to reflect for directory role %q", id.MemberId, id.DirectoryRoleId)
}
timeout := time.Until(deadline)
_, err = (&resource.StateChangeConf{
_, err = (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: timeout,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func servicePrincipalCertificateResourceCreate(ctx context.Context, d *schema.Re

// Wait for the credential to appear in the service principal manifest, this can take several minutes
timeout, _ := ctx.Deadline()
polledForCredential, err := (&resource.StateChangeConf{
polledForCredential, err := (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: time.Until(timeout),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func servicePrincipalPasswordResourceCreate(ctx context.Context, d *schema.Resou

// Wait for the credential to appear in the service principal manifest, this can take several minutes
timeout, _ := ctx.Deadline()
polledForCredential, err := (&resource.StateChangeConf{
polledForCredential, err := (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: time.Until(timeout),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func servicePrincipalTokenSigningCertificateResourceCreate(ctx context.Context,

// Wait for the credential to appear in the service principal manifest, this can take several minutes
timeout, _ := ctx.Deadline()
polledForCredential, err := (&resource.StateChangeConf{
polledForCredential, err := (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: time.Until(timeout),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func synchronizationJobResourceCreate(ctx context.Context, d *schema.ResourceDat

// Wait for the job to appear, this can take several moments
timeout, _ := ctx.Deadline()
_, err = (&resource.StateChangeConf{
_, err = (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: time.Until(timeout),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func synchronizationSecretResourceCreate(ctx context.Context, d *schema.Resource

// Wait for the secret to appear
timeout, _ := ctx.Deadline()
_, err = (&resource.StateChangeConf{
_, err = (&resource.StateChangeConf{ //nolint:staticcheck
Pending: []string{"Waiting"},
Target: []string{"Done"},
Timeout: time.Until(timeout),
Expand Down

0 comments on commit 7e2d1a6

Please sign in to comment.