diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 890df76c46..16a8c60c25 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,18 +64,23 @@ jobs: target/ key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Build - run: cargo build + - name: Install clippy sarif + uses: cargo-bins/cargo-binstall@main + with: + tool: + - clippy-sarif + - sarif-fmt - - name: Run clippy - uses: giraffate/clippy-action@v1 + - name: Setup reviewdog + uses: reviewdog/action-setup@v1 with: - reporter: "github-check" - github_token: ${{ secrets.GITHUB_TOKEN }} - level: warning - fail_on_error: true - filter_mode: file - clippy_debug: true + reviewdog_version: latest + + - name: Run clippy + - run: cargo clippy -message-format=json | clippy-sarif | tee clippy.sarif | sarif-fmt + + - name: Run clippy reviewdog + - run: cat clippy.sarif > reviewdog -f=sarif -name=clippy -reporter=github-check -filter-mode=file -fail-on-error=true -level=warning - name: Install neovim uses: rhysd/action-setup-vim@v1