1name: Clippy 2on: 3 push: 4 branches: 5 - main 6 pull_request: 7 8permissions: 9 contents: read 10 11# Cancel the workflow if a new one is triggered from the same PR, branch, or tag, except on main. 12concurrency: 13 group: ${{ github.workflow }}-${{ github.ref }} 14 cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} 15 16jobs: 17 clippy: 18 name: "Clippy" 19 runs-on: ubuntu-latest 20 21 steps: 22 - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 23 24 - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 25 with: 26 toolchain: stable 27 28 - name: Run clippy 29 run: cargo clippy --no-default-features -- -Dwarnings 30 31 - name: Run clippy with C API 32 run: cargo clippy --no-default-features --features=capi -- -Dwarnings 33