Skip to content

Commit e484fee

Browse files
committed
add
1 parent 13296f2 commit e484fee

File tree

2 files changed

+12
-33
lines changed

2 files changed

+12
-33
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,23 @@ jobs:
2323
# Steps represent a sequence of tasks that will be executed as part of the job
2424
steps:
2525
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727
with:
2828
fetch-depth: 0
2929
ref: ${{ github.event.pull_request.head.sha }}
3030

31-
- uses: actions/setup-go@v3
31+
- uses: actions/setup-go@v5
3232
with:
3333
go-version-file: .go-version
34-
#go-version: '1.21'
34+
go-version: '1.21'
3535
cache: false
36-
37-
- name: Get list of changed files
38-
id: getDiffFile
39-
run: |
40-
echo "::set-output name=files::$(git diff --name-only origin/master | grep '^tencentcloud/.*\.go$' | xargs)"
41-
shell: bash
42-
43-
- name: Check for changed Go files
44-
id: checkDiffFile
45-
run: |
46-
if [ -z "${{ steps.getDiffFile.outputs.files }}" ]; then
47-
echo "No Go files changed."
48-
exit 0
49-
fi
50-
51-
- name: Print changed files
52-
id: showDiffFile
53-
run: |
54-
echo "Changed Go files: ${{ steps.getDiffFile.outputs.files }}"
5536

5637
# Runs a set of commands using the runners shell
5738
- name: golangci-lint
58-
uses: golangci/golangci-lint-action@v3
39+
uses: golangci/golangci-lint-action@v4
5940
with:
60-
version: v1.63.4
61-
working-directory: .
62-
args: --new-from-rev=origin/master -v ${{ steps.getDiffFile.outputs.files }}
63-
#args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=origin/master -v
41+
skip-cache: true
42+
version: v1.54
43+
working-directory: ./tencentcloud
44+
args: --new-from-rev=origin/master -v
45+
#args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=origin/master -v

.golangci.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,25 @@ issues:
1010
linters:
1111
disable-all: true
1212
enable:
13-
- deadcode
1413
- errcheck
1514
- gofmt
1615
- gosimple
1716
- ineffassign
1817
- misspell
1918
- staticcheck
20-
- structcheck
2119
- unconvert
2220
- unused
23-
- varcheck
2421
- vet
2522

2623
linters-settings:
2724
errcheck:
28-
ignore: github.com/hashicorp/terraform-plugin-sdk/helper/schema:ForceNew|Set,fmt:.*,io:Close
25+
exclude-functions: github.com/hashicorp/terraform-plugin-sdk/helper/schema:ForceNew|Set,fmt:.*,io:Close
2926

3027
run:
3128
modules-download-mode: vendor
3229
timeout: 60m
3330
# The default concurrency value is the number of available CPU.
34-
concurrency: 12
31+
concurrency: 4
3532
# Allow multiple parallel golangci-lint instances running.
3633
# If false (default) - golangci-lint acquires file lock on start.
37-
allow-parallel-runners: true
34+
allow-parallel-runners: true

0 commit comments

Comments
 (0)