Skip to content

Commit

Permalink
Replace golangci errcheck ignore with exclude-functions
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickcping committed Nov 14, 2024
1 parent 17cd7ee commit f527ed6
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions .ci/.golangci2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,11 @@ linters-settings:
dogsled:
max-blank-identifiers: 3
errcheck:
ignore: github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set
# "ignore" is deprecated but "exclude-functions" doesn't seem to work or the syntax is non-obvious.
# https://github.com/kisielk/errcheck#excluding-functions
# Under exclude-functions are the various attempts at getting it to work, all of which result in d.Set being linted everywhere.
# exclude-functions:
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*ResourceData).Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.ResourceData.Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set,io:Close
# - (github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.ResourceData).Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:Set
# - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.Set
# - io:Close
exclude-functions:
- (*github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.ResourceData).Set
- (*github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.ResourceDiff).SetNewComputed
- (*github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.ResourceDiff).ForceNew
- io:Close
errorlint:
errorf: false
goconst:
Expand Down

0 comments on commit f527ed6

Please sign in to comment.