just: add check recipe (fmt + clippy + test) #10
Labels
No labels
in-review
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
weiwen/evie#10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Nothing in the repo runs
cargo fmt/clippy/testtoday: there is no CI, and.sandcastle/implement-prompt.mdtells the agent to runnpm run typecheck && npm run test— but this is a Rust project with no npm scripts, so the feedback loop is a no-op. We want one canonical command the reviewer and implementer both run, plus baseline lint hardening enforced by clippy.What
1. Justfile recipes
Add to the root
Justfile:fmt→cargo fmtlint→cargo clippy --all-targets -- -D warningstest→cargo testcheck→cargo fmt --check+cargo clippy --all-targets -- -D warnings+cargo test(composes the above; this is the recipe the review flow calls)Clippy runs with
-D warningsso warnings are hard failures. The existingsandcastlerecipe stays.2. Cargo.toml: lint table + edition 2024
Bump the crate to Rust 2024 and add denied unsafe-hygiene lints. evie is a single crate, so make it its own workspace root (bare
[workspace]table) and opt the package in via[lints] workspace = true:```toml
[package]
edition = "2024" # was 2021
[workspace]
[workspace.lints.rust]
unsafe_code = "deny"
unsafe_op_in_unsafe_fn = "deny"
unused_unsafe = "deny"
[workspace.lints.clippy]
missing_safety_doc = "deny"
multiple_unsafe_ops_per_block = "deny"
undocumented_unsafe_blocks = "deny"
unnecessary_safety_comment = "deny"
[lints]
workspace = true
```
(Equivalent single-crate form without
[workspace]is[lints.rust]/[lints.clippy]directly — use whichever is cleaner, but the opt-in must be present or the lints do nothing.)The codebase currently has no
unsafe, sounsafe_code = \"deny\"is safe to add. The edition bump may need acargo fix --editionmigration pass — run it and commit any resulting churn.Acceptance criteria
just checkruns fmt-check, clippy (warnings = error), and tests in sequence; fails on any violation.just fmt/just lint/just testwork standalone.edition = \"2024\".unsafe {}block and confirmcargo clippydenies it, then revert).just checkafter the changes.Notes
Recipes call
cargodirectly (not via nix) — the nix env is provided by the caller (nix develop .#ci -c just check). Independent of the flake/Dockerfile issues for authoring, but only runnable in the sandbox once #9 and #11 land.