5.8 just check

Build it yourself. Read the tutorial is the other way to read this part.

This walk goes through rahuldave/cheesecracker on GitHub. This part starts from the code at 693a713a458d, partway through step-05. The code before this part

This part does not start where the part before it ends, because the walk skips some changes. This command puts the files that this part starts from in place of yours. Run it, and then go on:

git restore --source b947593e84b7 --staged -- :/ && git restore --source 693a713a458d --staged --worktree -- :/

If you start at this part, make your clone as Get the project says, and then run this command. It puts in your clone the files that this part starts from. A file that the project deleted before this part stays, so delete it if git check lists it:

git rm -rq --cached --ignore-unmatch -- :/ && git restore --source 693a713a458d --staged --worktree -- :/
just setup

The whole tutorial then fixes the code with ruff, and shortens a long line. One recipe runs every check.

5.8 just check runs every check

The layout, the rules and the tests each have a recipe now. The recipe check runs all three, and stops at the first that fails.

Apply the patch to justfile, from the top of the project:

curl -fsSL https://github.com/rahuldave/cheesecracker/commit/e89e0cfa991257757c887f687087a9c77c093e20.diff | git apply --include=justfile

Read the recipe check at the end of the justfile.

just check

just prints each command, and the last line is 21 passed.

Check your files against this move. The command prints nothing when they match, and otherwise shows what differs:

git check e89e0cfa9912

If you are stuck, this command puts the files of this move in place of yours. A file that you made yourself stays:

git fetch --quiet --tags --force origin; git restore --source 693a713a458d --staged -- :/ && git restore --source step-05 --staged --worktree -- :/

What changed

  • justfile: the recipe check. 6 lines added. The file
    • look at just fmt --check

The patch to justfile
@@ -52,3 +52,9 @@ fmt *args:
 # Check the code against the rules in pyproject.toml. Extra arguments go to ruff: just lint --fix
 lint *args:
     uv run ruff check "$@"
+
+# Everything a commit must pass: the format, the lint and the tests
+check:
+    just fmt --check
+    just lint
+    just test -q

This change on GitHub

This part ends at the code at step-05. The code after this part