diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 458f241aae..a9cc834653 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -7,6 +7,8 @@ on: pull_request: paths: - tencentcloud/** + - .github/** + - .golangci.yml # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -29,7 +31,7 @@ jobs: - uses: actions/setup-go@v3 with: go-version-file: .go-version - cache: false + cache: true # Runs a set of commands using the runners shell - name: golangci-lint @@ -37,3 +39,5 @@ jobs: with: version: v1.45.2 working-directory: ./tencentcloud + args: --new-from-rev=master -v + #args: --enable-all --max-same-issues=0 --max-issues-per-linter=0 --new-from-rev=master -v diff --git a/.golangci.yml b/.golangci.yml index cb03197994..cf1d742529 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -29,4 +29,9 @@ linters-settings: run: modules-download-mode: vendor - timeout: 10m + timeout: 15m + # The default concurrency value is the number of available CPU. + concurrency: 12 + # Allow multiple parallel golangci-lint instances running. + # If false (default) - golangci-lint acquires file lock on start. + allow-parallel-runners: true