Repository navigation
fix(scripts): document private items in the pre-push doc check - #13838
Conversation
The "Rust CI / Doc" job runs `cargo doc` with `--document-private-items` and the pre-push check did not. Nearly every item in these crates is private or `pub(super)`, and rustdoc only resolves the doc links of the items it documents, so a link to a renamed or deleted private item passed the local check and failed CI. Reproduced by pointing one doc comment at a name that does not exist: the old command reports nothing, the CI command reports `unresolved link`. Caught after two red `Rust CI / Doc` runs on #13835. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
PR Summary by QodoAlign pre-push Rust docs check with CI by documenting private items
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pre-push Rust documentation check now passes ChangesRust documentation validation
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested labels: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can group findings by type and pick your Finding display, from Minimal to Full |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Confidence Score: 5/5The PR appears safe to merge because the local documentation command now exercises the same private-item rustdoc validation used by CI. The added flag is supported by the pinned Rust toolchain, matches the CI documentation job, and no changed-code-triggered failure remains. Reviews (1): Last reviewed commit: "fix(scripts): document private items in ..." | Re-trigger Greptile |
Summary
The
Rust CI / Docjob runsand
pnpm/scripts/pre-push-rust.shran the same thing without--document-private-items. Nearly every item in these crates is private orpub(super), and rustdoc only resolves the doc links of the items it documents — so a link to a renamed or deleted private item passes the local check and fails CI.Reproduced by pointing one doc comment at a name that does not exist (
[fn@walk_node_children_renamed]), withtarget/docremoved before each run:cargo doc --no-deps --workspace --all-features(before)cargo doc --no-deps --workspace --all-features --document-private-items(after)error: unresolved link to 'walk_node_children_renamed'--all-featuresstays, so the local gate remains a superset of CI's.Found the slow way: two red
Rust CI / Docruns on #13835, where deleting a private function left doc links to it behind and the pre-push check waved them through both times.No changeset — this touches a developer script, not a published package.
Squash Commit Body
Checklist
The check is its own test: running the updated script against a deliberately broken doc link fails, and against
mainpasses end to end (fmt, clippy, doc, dylint, typos, taplo).Written by an agent (Claude Code, claude-opus-5[1m]).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit