Skip to content

Commit

Permalink
Merge pull request hashicorp#40129 from patrickcping/golangci-exclude…
Browse files Browse the repository at this point in the history
…-functions-202411

Replace golangci `errcheck` `ignore` with `exclude-functions`
  • Loading branch information
gdavison authored Nov 19, 2024
2 parents c941f3b + f527ed6 commit 1a37227
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 1a37227

Please sign in to comment.