Skip to content

Commit

Permalink
Run clippy in the CI with warnings disallowed
Browse files Browse the repository at this point in the history
As discussed previously it'd be nice to keep `ispc-rs` "free" of simple
"code smells" commonly pointed out by `clippy`.  This is easy to guard
by disallowing any clippy warnings from trickling into the codebase
through PRs via an extra CI check.

Downside is that Rust upgrades every 6 weeks and usually enables new or
improves existing lints, resulting in unrelated CI errors caused by
existing code being punted on unsuspecting contributors in newly opened
PRs.  But these are typically easy to resolve in a separate PR, or to be
caught early when (also) running the CI job on a schedule.
  • Loading branch information
MarijnS95 committed Oct 20, 2022
1 parent d2eb232 commit 25f8196
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- run: curl -L https://github.com/ispc/ispc/releases/download/v${{ env.ISPC_VERSION }}/ispc-v${{ env.ISPC_VERSION }}-linux.tar.gz | tar xzv ispc-v${{ env.ISPC_VERSION }}-linux/bin/ispc
- run: realpath "ispc-v${{ env.ISPC_VERSION }}-linux/bin/" >> $GITHUB_PATH
- run: cargo build --all --all-targets --features ispc
- run: cargo clippy --all --all-targets --features ispc -- -D warnings
- run: cargo test --all
- run: cargo doc --all --no-deps --document-private-items --all-features
env:
Expand All @@ -29,6 +30,7 @@ jobs:
toolchain: stable
- run: brew install ispc
- run: cargo build --all --all-targets --features ispc
- run: cargo clippy --all --all-targets --features ispc -- -D warnings
- run: cargo test --all
build_windows:
runs-on: windows-latest
Expand All @@ -42,4 +44,5 @@ jobs:
unzip ispc-v${{ env.ISPC_VERSION }}-windows.zip ispc-v${{ env.ISPC_VERSION }}-windows/bin/ispc.exe
Resolve-Path "ispc-v${{ env.ISPC_VERSION }}-windows/bin" | Add-Content -Path $env:GITHUB_PATH
- run: cargo build --all --all-targets --features ispc
- run: cargo clippy --all --all-targets --features ispc -- -D warnings
- run: cargo test --all

0 comments on commit 25f8196

Please sign in to comment.