From 35abfe18007ec650013ac97168abe2dba1aa676a Mon Sep 17 00:00:00 2001 From: SevenEarth <391613297@qq.com> Date: Tue, 10 Dec 2024 20:32:02 +0800 Subject: [PATCH 1/4] add --- .github/workflows/golangci-lint.yml | 8 +++++++- .../ccn/resource_tc_ccn_route_table_input_policies.go | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 780eeadf23..643ea80dc0 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -34,6 +34,12 @@ jobs: #go-version: '1.21' cache: false + - name: list of changed files + id: getDiffFile + run: | + echo "::set-output name=files::$(git diff --name-only origin/master | grep '\.go$' | xargs)" + shell: bash + # Runs a set of commands using the runners shell - name: golangci-lint uses: golangci/golangci-lint-action@v3 @@ -41,5 +47,5 @@ jobs: version: v1.48.0 #version: v1.54 working-directory: ./tencentcloud - args: --new-from-rev=origin/master -v + args: {{ steps.getDiffFile.outputs.files }} --new-from-rev=origin/master -v #args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=origin/master -v diff --git a/tencentcloud/services/ccn/resource_tc_ccn_route_table_input_policies.go b/tencentcloud/services/ccn/resource_tc_ccn_route_table_input_policies.go index 4046111889..5a6d147f01 100644 --- a/tencentcloud/services/ccn/resource_tc_ccn_route_table_input_policies.go +++ b/tencentcloud/services/ccn/resource_tc_ccn_route_table_input_policies.go @@ -31,12 +31,14 @@ func ResourceTencentCloudCcnRouteTableInputPolicies() *schema.Resource { Type: schema.TypeString, Description: "CCN Instance ID.", }, + "route_table_id": { Required: true, ForceNew: true, Type: schema.TypeString, Description: "CCN Route table ID.", }, + "policies": { Optional: true, Type: schema.TypeList, From 5d4305a9e26f00af67f9209a44aefbd69710d4d5 Mon Sep 17 00:00:00 2001 From: SevenEarth <391613297@qq.com> Date: Tue, 10 Dec 2024 20:34:52 +0800 Subject: [PATCH 2/4] add --- .../services/ccn/resource_tc_ccn_route_table_input_policies.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/tencentcloud/services/ccn/resource_tc_ccn_route_table_input_policies.go b/tencentcloud/services/ccn/resource_tc_ccn_route_table_input_policies.go index 5a6d147f01..4046111889 100644 --- a/tencentcloud/services/ccn/resource_tc_ccn_route_table_input_policies.go +++ b/tencentcloud/services/ccn/resource_tc_ccn_route_table_input_policies.go @@ -31,14 +31,12 @@ func ResourceTencentCloudCcnRouteTableInputPolicies() *schema.Resource { Type: schema.TypeString, Description: "CCN Instance ID.", }, - "route_table_id": { Required: true, ForceNew: true, Type: schema.TypeString, Description: "CCN Route table ID.", }, - "policies": { Optional: true, Type: schema.TypeList, From bc25a6b55d562601dc2b0fc21971b94ebcd9abbc Mon Sep 17 00:00:00 2001 From: SevenEarth <391613297@qq.com> Date: Tue, 10 Dec 2024 20:37:52 +0800 Subject: [PATCH 3/4] add --- .github/workflows/golangci-lint.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 643ea80dc0..d14f8a1de7 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -22,6 +22,12 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: + - name: list of changed files + id: getDiffFile + run: | + echo "::set-output name=files::$(git diff --name-only origin/master | grep '\.go$' | xargs)" + shell: bash + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v3 with: @@ -34,12 +40,6 @@ jobs: #go-version: '1.21' cache: false - - name: list of changed files - id: getDiffFile - run: | - echo "::set-output name=files::$(git diff --name-only origin/master | grep '\.go$' | xargs)" - shell: bash - # Runs a set of commands using the runners shell - name: golangci-lint uses: golangci/golangci-lint-action@v3 From 8d6245db168c5ee37dbf6a1e9e89908e48b42c03 Mon Sep 17 00:00:00 2001 From: SevenEarth <391613297@qq.com> Date: Tue, 10 Dec 2024 20:40:15 +0800 Subject: [PATCH 4/4] add --- .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 d14f8a1de7..2c73c99d5e 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -47,5 +47,5 @@ jobs: version: v1.48.0 #version: v1.54 working-directory: ./tencentcloud - args: {{ steps.getDiffFile.outputs.files }} --new-from-rev=origin/master -v + 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