From f527ed64869a325623888ead82a3f86168ecfe23 Mon Sep 17 00:00:00 2001 From: Patrick Cowland Date: Thu, 14 Nov 2024 15:03:56 +0000 Subject: [PATCH] Replace golangci `errcheck` `ignore` with `exclude-functions` --- .ci/.golangci2.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.ci/.golangci2.yml b/.ci/.golangci2.yml index 55624bef6b2..df9ad9c85c7 100644 --- a/.ci/.golangci2.yml +++ b/.ci/.golangci2.yml @@ -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: