From 9ed696df2661292532183ddd84eca13bee8b6bf3 Mon Sep 17 00:00:00 2001 From: SevenEarth <45937856+SevenEarth@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:43:36 +0800 Subject: [PATCH 01/11] Update golangci-lint.yml --- .github/workflows/golangci-lint.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 6a6ce9fd8c..09957c424e 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -37,7 +37,13 @@ jobs: - name: Get list of changed files id: getDiffFile run: | - echo "::set-output name=files::$(git diff --name-only origin/master | grep '^tencentcloud/.*\.go$' | xargs)" + prefix=$(pwd) + files=$(git diff --name-only origin/master | grep '^tencentcloud/.*\.go$' | xargs) + files_with_prefix="" + for file in $files; do + files_with_prefix="$files_with_prefix $prefix/$file" + done + echo "::set-output name=files::$files_with_prefix" shell: bash - name: Check for changed Go files @@ -58,6 +64,6 @@ jobs: uses: golangci/golangci-lint-action@v3 with: version: v1.63.4 - working-directory: . + # working-directory: . args: --new-from-rev=origin/master -v ${{ steps.getDiffFile.outputs.files }} #args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=origin/master -v From ad988dd85d814eaa36c0b634ca1b239675619cf6 Mon Sep 17 00:00:00 2001 From: SevenEarth <45937856+SevenEarth@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:39:12 +0800 Subject: [PATCH 02/11] Update .golangci.yml --- .golangci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 831b35d913..83841d6389 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,17 +10,14 @@ issues: linters: disable-all: true enable: - - deadcode - errcheck - gofmt - gosimple - ineffassign - misspell - staticcheck - - structcheck - unconvert - unused - - varcheck - vet linters-settings: From b3c058d1c458e56ffb46ecff0d7d49233f053549 Mon Sep 17 00:00:00 2001 From: SevenEarth <45937856+SevenEarth@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:45:04 +0800 Subject: [PATCH 03/11] Update provider.go --- tencentcloud/provider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tencentcloud/provider.go b/tencentcloud/provider.go index b669f8f273..3ac977c744 100644 --- a/tencentcloud/provider.go +++ b/tencentcloud/provider.go @@ -172,13 +172,13 @@ func Provider() *schema.Provider { Type: schema.TypeString, Optional: true, DefaultFunc: schema.EnvDefaultFunc(PROVIDER_SECRET_ID, nil), - Description: "This is the TencentCloud access key. It can also be sourced from the `TENCENTCLOUD_SECRET_ID` environment variable.", + Description: "111This is the TencentCloud access key. It can also be sourced from the `TENCENTCLOUD_SECRET_ID` environment variable.", }, "secret_key": { Type: schema.TypeString, Optional: true, DefaultFunc: schema.EnvDefaultFunc(PROVIDER_SECRET_KEY, nil), - Description: "This is the TencentCloud secret key. It can also be sourced from the `TENCENTCLOUD_SECRET_KEY` environment variable.", + Description: "111This is the TencentCloud secret key. It can also be sourced from the `TENCENTCLOUD_SECRET_KEY` environment variable.", Sensitive: true, }, "security_token": { From bc606296b9072870f908511484055723d1a074d7 Mon Sep 17 00:00:00 2001 From: SevenEarth <45937856+SevenEarth@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:50:01 +0800 Subject: [PATCH 04/11] Update .golangci.yml --- .golangci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 83841d6389..831b35d913 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,14 +10,17 @@ issues: linters: disable-all: true enable: + - deadcode - errcheck - gofmt - gosimple - ineffassign - misspell - staticcheck + - structcheck - unconvert - unused + - varcheck - vet linters-settings: From ee64f57681afbe79f488b2c252ff1d24e2b62a25 Mon Sep 17 00:00:00 2001 From: SevenEarth <45937856+SevenEarth@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:51:21 +0800 Subject: [PATCH 05/11] Update golangci-lint.yml --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 09957c424e..fa723e17d8 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -63,7 +63,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.63.4 + version: v1.45.2 # working-directory: . args: --new-from-rev=origin/master -v ${{ steps.getDiffFile.outputs.files }} #args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=origin/master -v From 11851ad7177bbea9d7d9c85e666420025c833e57 Mon Sep 17 00:00:00 2001 From: SevenEarth <45937856+SevenEarth@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:41:09 +0800 Subject: [PATCH 06/11] Update data_source_tc_as_advices.go --- tencentcloud/services/as/data_source_tc_as_advices.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tencentcloud/services/as/data_source_tc_as_advices.go b/tencentcloud/services/as/data_source_tc_as_advices.go index 4eecf23061..ec4b8b43aa 100644 --- a/tencentcloud/services/as/data_source_tc_as_advices.go +++ b/tencentcloud/services/as/data_source_tc_as_advices.go @@ -22,13 +22,13 @@ func DataSourceTencentCloudAsAdvices() *schema.Resource { Elem: &schema.Schema{ Type: schema.TypeString, }, - Description: "List of scaling groups to be queried. Upper limit: 100.", + Description: "123List of scaling groups to be queried. Upper limit: 100.", }, "auto_scaling_advice_set": { Computed: true, Type: schema.TypeList, - Description: "A collection of suggestions for scaling group configurations.", + Description: "123A collection of suggestions for scaling group configurations.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "auto_scaling_group_id": { From 441d39c278254ea00001e24158009fad9e5949f9 Mon Sep 17 00:00:00 2001 From: SevenEarth <45937856+SevenEarth@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:02:04 +0800 Subject: [PATCH 07/11] Update .golangci.yml --- .golangci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 831b35d913..c6fbdd204a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,17 +10,14 @@ issues: linters: disable-all: true enable: - - deadcode - errcheck - gofmt - gosimple - ineffassign - misspell - staticcheck - - structcheck - unconvert - unused - - varcheck - vet linters-settings: @@ -31,7 +28,7 @@ run: modules-download-mode: vendor timeout: 60m # The default concurrency value is the number of available CPU. - concurrency: 12 + concurrency: 2 # Allow multiple parallel golangci-lint instances running. # If false (default) - golangci-lint acquires file lock on start. allow-parallel-runners: true From 4d41799da297d4653188ba89a94fb762b258c3dc Mon Sep 17 00:00:00 2001 From: SevenEarth <45937856+SevenEarth@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:28:11 +0800 Subject: [PATCH 08/11] Update golangci-lint.yml --- .github/workflows/golangci-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index fa723e17d8..09957c424e 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -63,7 +63,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@v3 with: - version: v1.45.2 + version: v1.63.4 # working-directory: . args: --new-from-rev=origin/master -v ${{ steps.getDiffFile.outputs.files }} #args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=origin/master -v From 3a83555e761147104aaec66751607c88d7814e78 Mon Sep 17 00:00:00 2001 From: SevenEarth <45937856+SevenEarth@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:29:34 +0800 Subject: [PATCH 09/11] Update .golangci.yml --- .golangci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index c6fbdd204a..800979b11e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -22,7 +22,7 @@ linters: linters-settings: errcheck: - ignore: github.com/hashicorp/terraform-plugin-sdk/helper/schema:ForceNew|Set,fmt:.*,io:Close + exclude-functions: github.com/hashicorp/terraform-plugin-sdk/helper/schema:ForceNew|Set,fmt:.*,io:Close run: modules-download-mode: vendor From fea55350365acf65aa290c0fd17189dfa7acb78b Mon Sep 17 00:00:00 2001 From: SevenEarth <45937856+SevenEarth@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:33:33 +0800 Subject: [PATCH 10/11] Update golangci-lint.yml --- .github/workflows/golangci-lint.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 09957c424e..d3e032e02b 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -33,17 +33,17 @@ jobs: go-version-file: .go-version #go-version: '1.21' cache: false + + - name: Get root path + id: getRootPath + run: | + echo "::set-output path=$(pwd)" + shell: bash - name: Get list of changed files id: getDiffFile run: | - prefix=$(pwd) - files=$(git diff --name-only origin/master | grep '^tencentcloud/.*\.go$' | xargs) - files_with_prefix="" - for file in $files; do - files_with_prefix="$files_with_prefix $prefix/$file" - done - echo "::set-output name=files::$files_with_prefix" + echo "::set-output name=files::$(git diff --name-only origin/master | grep '^tencentcloud/.*\.go$' | xargs)" shell: bash - name: Check for changed Go files @@ -64,6 +64,6 @@ jobs: uses: golangci/golangci-lint-action@v3 with: version: v1.63.4 - # working-directory: . + working-directory: ${{ steps.getRootPath.outputs.path }} args: --new-from-rev=origin/master -v ${{ steps.getDiffFile.outputs.files }} #args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=origin/master -v From fb73daf926dce1077a6f9723d4c2d88c1964b3a9 Mon Sep 17 00:00:00 2001 From: seanyyan Date: Wed, 8 Jan 2025 16:43:18 +0800 Subject: [PATCH 11/11] add --- tencentcloud/services/as/data_source_tc_as_advices.go | 4 ++-- .../services/audit/data_source_tc_audit_cos_regions.go | 4 ++-- tencentcloud/services/bh/resource_tc_dasb_acl.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tencentcloud/services/as/data_source_tc_as_advices.go b/tencentcloud/services/as/data_source_tc_as_advices.go index ec4b8b43aa..4eecf23061 100644 --- a/tencentcloud/services/as/data_source_tc_as_advices.go +++ b/tencentcloud/services/as/data_source_tc_as_advices.go @@ -22,13 +22,13 @@ func DataSourceTencentCloudAsAdvices() *schema.Resource { Elem: &schema.Schema{ Type: schema.TypeString, }, - Description: "123List of scaling groups to be queried. Upper limit: 100.", + Description: "List of scaling groups to be queried. Upper limit: 100.", }, "auto_scaling_advice_set": { Computed: true, Type: schema.TypeList, - Description: "123A collection of suggestions for scaling group configurations.", + Description: "A collection of suggestions for scaling group configurations.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "auto_scaling_group_id": { diff --git a/tencentcloud/services/audit/data_source_tc_audit_cos_regions.go b/tencentcloud/services/audit/data_source_tc_audit_cos_regions.go index 411496b219..34e6e4708b 100644 --- a/tencentcloud/services/audit/data_source_tc_audit_cos_regions.go +++ b/tencentcloud/services/audit/data_source_tc_audit_cos_regions.go @@ -21,12 +21,12 @@ func DataSourceTencentCloudAuditCosRegions() *schema.Resource { "result_output_file": { Type: schema.TypeString, Optional: true, - Description: "Used to save results.", + Description: "123Used to save results.", }, "audit_cos_region_list": { Type: schema.TypeList, Computed: true, - Description: "List of available regions supported by audit cos.", + Description: "123List of available regions supported by audit cos.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "cos_region": { diff --git a/tencentcloud/services/bh/resource_tc_dasb_acl.go b/tencentcloud/services/bh/resource_tc_dasb_acl.go index 880d001c13..c2cb9dacfc 100644 --- a/tencentcloud/services/bh/resource_tc_dasb_acl.go +++ b/tencentcloud/services/bh/resource_tc_dasb_acl.go @@ -28,7 +28,7 @@ func ResourceTencentCloudDasbAcl() *schema.Resource { "name": { Required: true, Type: schema.TypeString, - Description: "Acl name.", + Description: "123Acl name.", }, "allow_disk_redirect": { Required: true,