Skip to content

Commit

Permalink
Fix "unused-parameter" linting error:
Browse files Browse the repository at this point in the history
```
unused-parameter: parameter 'd' seems to be unused, consider removing or renaming it as _ (revive)
```

Signed-off-by: Brendan Winter <bwinter@vmware.com>
  • Loading branch information
bwinter committed Jun 2, 2023
1 parent 34986ad commit 4663c96
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions wavefront/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)

func suppressCase(k, old, new string, d *schema.ResourceData) bool {
func suppressCase(_, old, new string, _ *schema.ResourceData) bool {
return strings.EqualFold(old, new)
}

func suppressSpaces(k, old, new string, d *schema.ResourceData) bool {
func suppressSpaces(_, old, new string, _ *schema.ResourceData) bool {
return strings.TrimSpace(old) == strings.TrimSpace(new)
}

Expand Down
2 changes: 1 addition & 1 deletion wavefront/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestProvider(t *testing.T) {
}
}

func TestProvider_impl(t *testing.T) {
func TestProvider_impl(_ *testing.T) {
var _ *schema.Provider = Provider()
}

Expand Down
2 changes: 1 addition & 1 deletion wavefront/resource_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func resourceAlert() *schema.Resource {
}
}

func validateAlertTarget(val interface{}, key string) (warnings []string, errors []error) {
func validateAlertTarget(val interface{}, _ string) (warnings []string, errors []error) {
target := val.(string)
if target == "" {
return nil, nil
Expand Down
2 changes: 1 addition & 1 deletion wavefront/resource_dashboad_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func resourceDashboardJSONDelete(d *schema.ResourceData, meta interface{}) error
return nil
}

func ValidateDashboardJSON(val interface{}, key string) ([]string, []error) {
func ValidateDashboardJSON(val interface{}, _ string) ([]string, []error) {
dashboardJSONString := val.(string)
var dashboard wavefront.Dashboard
err := dashboard.UnmarshalJSON([]byte(dashboardJSONString))
Expand Down
2 changes: 1 addition & 1 deletion wavefront/resource_metrics_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func policyRulesSchema() map[string]*schema.Schema {
}
}

func validateAccessTypeVal(v interface{}, p cty.Path) diag.Diagnostics {
func validateAccessTypeVal(v interface{}, _ cty.Path) diag.Diagnostics {
var diags diag.Diagnostics

accessType := fmt.Sprintf("%v", v)
Expand Down

0 comments on commit 4663c96

Please sign in to comment.