Skip to content

Commit

Permalink
try to fix check script, more explicit rustup update
Browse files Browse the repository at this point in the history
  • Loading branch information
shawntabrizi committed Sep 12, 2024
1 parent a3e0879 commit 9d36bf2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
15 changes: 9 additions & 6 deletions check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,27 @@ for dir in $(ls -d steps/*/ | sort -V); do
if [ "$MODE" == "check" ]; then

echo "Checking cargo fmt"
cargo +nightly fmt -- --check
cargo +nightly fmt --quiet -- --check

echo "Checking cargo clippy"
RUSTFLAGS="-A unused" cargo +nightly clippy -- -D warnings
RUSTFLAGS="-A unused" cargo +nightly clippy --quiet -- -D warnings

echo "Checking cargo test"
RUSTFLAGS="-A unused -D warnings" cargo test
RUSTFLAGS="-A unused -D warnings" cargo test --quiet

echo "Cleaning up cargo"
cargo clean

elif [ "$MODE" == "fix" ]; then

echo "Running cargo fmt"
RUSTFLAGS="-A unused" cargo +nightly fmt
RUSTFLAGS="-A unused" cargo +nightly fmt --quiet

echo "Running cargo clippy"
RUSTFLAGS="-A unused" cargo +nightly clippy --fix --allow-dirty
RUSTFLAGS="-A unused" cargo +nightly clippy --quiet --fix --allow-dirty

echo "Running cargo test"
RUSTFLAGS="-A unused -D warnings" cargo test
RUSTFLAGS="-A unused -D warnings" cargo test --quiet

fi

Expand Down
8 changes: 4 additions & 4 deletions steps/1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The code in each step should have comments marked `TODO`, which indicate the act

At each step, we include a `diff` view so that you can see what has changed from the last step (new action items), and what should change to complete the step (the solution).

At the end of each step, you should be able to run all the following commands without any errors or warnings:
At the end of each step, you should be able to run all the following commands without any errors or warnings on the latest version of Rust (`rustup update`):

- `cargo +nightly fmt`
- `cargo +nightly clippy`
Expand Down Expand Up @@ -57,16 +57,16 @@ Or access the template directly here:

The starting template includes a `README` with instructions to setup your working environment. Follow those instructions.

Make sure you are able to run the following checks on this starting template without warnings or errors:
Make sure your rust compiler is up to date with `rustup update`.

Then, make sure you are able to run the following checks on this starting template without warnings or errors:

```bash
cargo +nightly fmt
cargo +nightly clippy
cargo test
```

In general, you should make sure your rust compiler is up to date with `rustup update`.

It may take a while for this to complete based on how powerful your computer is.

Feel free to move onto the next steps while these checks are compiling.
Expand Down

0 comments on commit 9d36bf2

Please sign in to comment.