diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8a582b036d..c3f0d7f910 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -75,19 +75,32 @@ jobs: - name: Checkout Actions Repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 -# fixme: disable for now, wait for golangci-lint supports go 1.23 -# - name: Run golangci-lint -# uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1 -# with: -# version: v1.59.1 -# args: '--out-format=colored-line-number,sarif:golangci-lint-results.sarif' -# continue-on-error: true -# -# - name: Upload analysis results to GitHub -# uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 -# with: -# sarif_file: ./golangci-lint-results.sarif -# wait-for-processing: true + - name: Setup Go + uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1 + with: + go-version: '1.23.0-rc.1' + cache: false + check-latest: true + + - name: Install golangci-lint + run: | + git clone --branch feat/go1.23 https://github.com/ZxillyFork/golangci-lint.git /tmp/golangci-lint + cd /tmp/golangci-lint + go install -v ./cmd/golangci-lint + + - name: Run golangci-lint + uses: ZxillyFork/golangci-lint-action@0fb21c9e50a3a22a7be9d97e24fb17818c3227df # v6.0.1 + with: + version: v1.59.1 + install-mode: 'none' + args: '--out-format=colored-line-number,sarif:golangci-lint-results.sarif' + continue-on-error: true + + - name: Upload analysis results to GitHub + uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 + with: + sarif_file: ./golangci-lint-results.sarif + wait-for-processing: true typos: name: Spell Check with Typos diff --git a/.golangci.yaml b/.golangci.yaml index e5332f98ce..989f8b57df 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -12,7 +12,6 @@ linters: - gosec - revive - thelper - - sqlclosecheck - nolintlint - dupword - usestdlibvars @@ -45,7 +44,7 @@ linters-settings: sections: - standard - default - - prefix(syscall/js) # fixme: workaround, wait for https://github.com/daixiang0/gci/pull/208 merged + - prefix(syscall/js,unique,iter) # fixme: workaround, wait for https://github.com/daixiang0/gci/pull/208 merged - localmodule custom-order: true