Commit Graph

2 Commits

Author SHA1 Message Date
Zoltan Kochan
94c13cc068 ci: run clippy as a single-OS job and add it to the pre-push hook (#12389)
* fix(pnpr): pass batch_publish test request bodies by reference

The put_json/put_json_with_token test helpers took the JSON body by
value but only borrowed it for serde_json::to_vec, tripping clippy's
needless_pass_by_value under --all-targets. Take &Value instead, which
also drops an unnecessary body.clone() at one call site.

* ci: run clippy as a single-OS job and add it to the pre-push hook

Clippy was a step inside the three-OS Lint-and-Test matrix, so it ran
once per OS even though it lints the same platform-independent source
each time. Move it to its own ubuntu-only job, mirroring the existing
single-OS doc, format, and dylint jobs (platform-gated cfg blocks are
still type-checked per-OS by the test build).

It was also missing from pacquet/scripts/pre-push-rust.sh, so a clippy
lint that only fires under --all-targets — like the one that just
reached main — slipped past local pushes and surfaced only in CI. Add
the same --all-targets workspace clippy gate to the hook.
2026-06-13 20:23:16 +02:00
Zoltan Kochan
e375a58261 chore: run cargo fmt, doc, and dylint checks in husky pre-push (#12035)
The Rust workspace's pre-push checks were sitting in
`pacquet/.githooks/pre-push` and only fired if a developer ran
`just install-hooks`, which would also disable every husky-managed
TypeScript hook by replacing `core.hooksPath`. Move the bash logic to
`pacquet/scripts/pre-push-rust.sh`, invoke it from `.husky/pre-push`
alongside the existing TS compile and lint checks, and drop the
`install-hooks` recipe so nobody re-points `core.hooksPath` by mistake.

The script now also runs `cargo doc --no-deps --workspace --all-features`
(with `RUSTDOCFLAGS=-D warnings`) and `cargo dylint --all -- --all-targets
--workspace` (with `RUSTFLAGS=-D warnings`), matching CI. `--workspace`
covers both `pacquet/crates/*` and `registry/crates/*` since they share
the root Cargo workspace.
2026-05-28 20:16:10 +02:00