From 16e1c7e4ebac284ecdeeb569469283b9c7aa391a Mon Sep 17 00:00:00 2001 From: Ivan Date: Tue, 15 Jul 2025 13:59:27 -0500 Subject: [PATCH] add revive workflow --- .github/workflows/revive.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/revive.yml diff --git a/.github/workflows/revive.yml b/.github/workflows/revive.yml new file mode 100644 index 0000000..ff26324 --- /dev/null +++ b/.github/workflows/revive.yml @@ -0,0 +1,35 @@ +name: Go Revive Lint + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + pull-requests: write + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.24' + + - name: Install revive + run: go install github.com/mgechev/revive@latest + + - name: Run revive and generate SARIF report + run: | + revive -config revive.toml -formatter sarif ./... > revive-results.sarif || true + + - name: Upload SARIF report + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: revive-results.sarif