Skip to content

Commit

Permalink
feat: Use clippy instead of check for better lint enforcement (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluefinger authored Nov 12, 2024
1 parent ee28a64 commit 4ce27f1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,19 @@ jobs:
- name: Install Rust
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
# Install Clippy if we are on a nightly run.
- name: Install Clippy
run: rustup component add clippy
if: startsWith(matrix.rust, 'nightly')
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
if: startsWith(matrix.os, 'ubuntu')
- name: Install wasm-pack
uses: taiki-e/install-action@wasm-pack
if: startsWith(matrix.os, 'ubuntu')
- name: Run cargo check
run: cargo check --all --all-features --all-targets
if: startsWith(matrix.rust, 'nightly')
- name: Run cargo check (without dev-dependencies to catch missing feature flags)
- name: Run clippy
run: cargo clippy --workspace --all-features --all-targets -- -Dwarnings
if: startsWith(matrix.rust, 'nightly')
run: cargo check -Z features=dev_dep
- run: cargo test --all-features
- name: Test wasm
run: wasm-pack test --headless --chrome --firefox -- --all-features
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ use bevy_prng::WyRand;
use bevy_rand::prelude::EntropyPlugin;
use rand_core::RngCore;

fn main() {
fn example_main() {
App::new()
.add_plugins(EntropyPlugin::<WyRand>::default())
.run();
Expand Down

0 comments on commit 4ce27f1

Please sign in to comment.