5.8 One recipe for every check

Read the tutorial. Build it yourself 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

To look at this code on your machine, run these commands. The first one makes a clone, if this folder has none:

[ -d cheesecracker ] || git clone https://github.com/rahuldave/cheesecracker
cd cheesecracker
git fetch --quiet --tags --force origin
git switch --detach 693a713a458d
just setup

The layout, the rules and the tests each have a recipe. One recipe, just check, runs them all.

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.

± See the change to justfile

The recipe check, at the end of the justfile, runs just fmt --check, just lint and just test -q, in that order.

just check

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

What changed

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

The diff of 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