diff --git a/.github/configs/golangci-lint/golangci.yaml b/.github/configs/golangci-lint/golangci.yaml index 081e1de8..60ff031b 100644 --- a/.github/configs/golangci-lint/golangci.yaml +++ b/.github/configs/golangci-lint/golangci.yaml @@ -1,26 +1,43 @@ +--- +version: "2" run: - timeout: 20m - tests: true modules-download-mode: readonly -issues: - max-issues-per-linter: 0 - max-same-issues: 0 - new: false + tests: true output: formats: - - format: colored-line-number - print-linter-name: true - sort-results: true - print-issued-lines: true + text: + path: stdout + print-linter-name: true + print-issued-lines: true + sort-order: + - file linters: - disable-all: true - fast: false + default: none enable: - # A stricter replacement for gofmt. - - gofumpt - # Inspects source code for security problems. - gosec - # Check for correctness of programs. - govet - # Drop-in replacement of golint. - revive + exclusions: + generated: lax + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + paths: + - third_party$ + - builtin$ + - examples$ +issues: + max-issues-per-linter: 0 + max-same-issues: 0 + new: false +formatters: + enable: + - gofumpt + exclusions: + generated: lax + paths: + - third_party$ + - builtin$ + - examples$ diff --git a/.github/workflows/go-static-analysis.yaml b/.github/workflows/go-static-analysis.yaml index b56b096f..806f2bce 100644 --- a/.github/workflows/go-static-analysis.yaml +++ b/.github/workflows/go-static-analysis.yaml @@ -50,7 +50,7 @@ jobs: run: | go mod vendor - name: golangci-lint - uses: golangci/golangci-lint-action@v6.5.2 + uses: golangci/golangci-lint-action@v7.0.0 with: version: latest skip-cache: true diff --git a/.github/workflows/go-version-workflow.yaml b/.github/workflows/go-version-workflow.yaml index 545fec28..f07d4136 100644 --- a/.github/workflows/go-version-workflow.yaml +++ b/.github/workflows/go-version-workflow.yaml @@ -69,7 +69,7 @@ jobs: # Needed for signing commits using Github App tokens # See: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#commit-signing - - uses: actions/create-github-app-token@v1.11.7 + - uses: actions/create-github-app-token@v2.0.2 id: generate-token with: app-id: ${{ vars.CSM_RELEASE_APP_ID }} diff --git a/.github/workflows/image-version-workflow.yaml b/.github/workflows/image-version-workflow.yaml index bf603e85..21268db9 100644 --- a/.github/workflows/image-version-workflow.yaml +++ b/.github/workflows/image-version-workflow.yaml @@ -107,7 +107,7 @@ jobs: # Needed for signing commits using Github App tokens # See: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#commit-signing - - uses: actions/create-github-app-token@v1.11.7 + - uses: actions/create-github-app-token@v2.0.2 id: generate-token with: app-id: ${{ vars.CSM_RELEASE_APP_ID }} diff --git a/.github/workflows/operator-version-update.yaml b/.github/workflows/operator-version-update.yaml index 25bf8986..0bbe4870 100644 --- a/.github/workflows/operator-version-update.yaml +++ b/.github/workflows/operator-version-update.yaml @@ -44,7 +44,7 @@ jobs: # Needed for signing commits using Github App tokens # See: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#commit-signing - name: Generate GitHub App Token - uses: actions/create-github-app-token@v1.11.7 + uses: actions/create-github-app-token@v2.0.2 id: generate-token with: app-id: ${{ vars.CSM_RELEASE_APP_ID }} diff --git a/.github/workflows/sidecar-version-update.yaml b/.github/workflows/sidecar-version-update.yaml index 5a41bf36..ece80683 100644 --- a/.github/workflows/sidecar-version-update.yaml +++ b/.github/workflows/sidecar-version-update.yaml @@ -63,7 +63,7 @@ jobs: # Needed for signing commits using Github App tokens # See: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#commit-signing - name: Generate GitHub App Token - uses: actions/create-github-app-token@v1.11.7 + uses: actions/create-github-app-token@v2.0.2 id: generate-token with: app-id: ${{ vars.CSM_RELEASE_APP_ID }} diff --git a/.github/workflows/update-libraries-to-commits.yml b/.github/workflows/update-libraries-to-commits.yml index 0d12d98a..7c17aae8 100644 --- a/.github/workflows/update-libraries-to-commits.yml +++ b/.github/workflows/update-libraries-to-commits.yml @@ -95,7 +95,7 @@ jobs: # Needed for signing commits using Github App tokens # See: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#commit-signing - - uses: actions/create-github-app-token@v1.11.7 + - uses: actions/create-github-app-token@v2.0.2 id: generate-token with: app-id: ${{ vars.CSM_RELEASE_APP_ID }} diff --git a/.github/workflows/update-libraries.yml b/.github/workflows/update-libraries.yml index bc721e91..8ac1ce67 100644 --- a/.github/workflows/update-libraries.yml +++ b/.github/workflows/update-libraries.yml @@ -79,7 +79,7 @@ jobs: # Needed for signing commits using Github App tokens # See: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#commit-signing - - uses: actions/create-github-app-token@v1.11.7 + - uses: actions/create-github-app-token@v2.0.2 id: generate-token with: app-id: ${{ vars.CSM_RELEASE_APP_ID }}