chore(gate): add rustdoc-warnings doc-check step - #495
Merged
Conversation
Add a `doc-check` cargo-make task running `RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps` and wire it into `gate`, so broken / private intra-doc links and invalid-HTML doc comments fail locally before review instead of surfacing there — the class a recent module split hit. Fix four pre-existing rustdoc warnings the new step surfaces: backtick `Complex<f32>` / `Complex<f64>` in the core crate doc, demote two private-target intra-doc links to code spans, and re-path a broken `BlockSparseTensor::conj` link to a resolvable target. Closes #494
There was a problem hiding this comment.
Pull request overview
This PR strengthens the local pre-PR cargo make gate workflow by adding a doc-check step that runs cargo doc --workspace --no-deps with rustdoc warnings denied, so broken/private intra-doc links and invalid doc-comment HTML fail the gate deterministically rather than surfacing later in review.
Changes:
- Add
doc-checktask toMakefile.toml(setsRUSTDOCFLAGS="-D warnings") and wire it intogate. - Update contributor documentation to reflect the new gate composition.
- Fix existing rustdoc warnings by adjusting doc comment formatting and intra-doc links across affected crates.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Makefile.toml | Adds doc-check task and includes it in gate; updates gate documentation comments. |
| CONTRIBUTING.md | Updates the documented gate composition and explains what doc-check catches. |
| crates/ariadnetor-core/src/lib.rs | Wraps Complex<f32>/Complex<f64> in backticks to avoid invalid HTML parsing in docs. |
| crates/ariadnetor-native/src/performance.rs | Replaces a private intra-doc link to a private helper with a non-link code span. |
| crates/ariadnetor-tensor/src/block_sparse/tensor_data.rs | Replaces a private intra-doc link to a pub(crate) method with a non-link code span. |
| crates/ariadnetor-tensor/src/tensor/dense_ops.rs | Fixes an intra-doc link by pointing it at crate::BlockSparseTensor::conj. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The sibling Complex<f32> / Complex<f64> entries are code spans; wrap the bare f32 / f64 too so the whole sealed-type list renders uniformly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cargo make gate(fmt-check + clippy + test) never ran rustdoc, so a broken or private intra-doc link — or an invalid-HTML doc comment — passed the local gate and surfaced only in later review. This adds adoc-checkstep that builds the workspace docs with rustdoc warnings denied, catching that class deterministically before a PR.Wiring the step in surfaced four pre-existing rustdoc warnings across three crates that fail the build today; they are fixed here so the gate is green on arrival.
Closes #494
Changes
Makefile.toml— add adoc-checktask (RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps) and add it to thegatedependency list; update the gate description and the top-of-file coverage note.CONTRIBUTING.md— reflect the new gate composition in the alias comment and the gate-prose paragraph.crates/ariadnetor-core/src/lib.rs— backtickComplex<f32>/Complex<f64>so the<…>are not parsed as HTML (invalid_html_tags).crates/ariadnetor-native/src/performance.rs,crates/ariadnetor-tensor/src/block_sparse/tensor_data.rs— demote two intra-doc links whose targets are private to plain code spans (private_intra_doc_links).crates/ariadnetor-tensor/src/tensor/dense_ops.rs— re-path a brokenBlockSparseTensor::conjlink to the resolvablecrate::BlockSparseTensor::conj(broken_intra_doc_links).Test plan
cargo make doc-checkexits 0 (all four fixes clean; the re-pathed link resolves) — this is the exact command the gate step runs.cargo make gateruns fmt-check + clippy + test + doc-check and passes.Notes
The step runs default features only, matching clippy and test, so rustdoc warnings inside the feature-gated
arpack/hpttdoc regions are not covered — building them would pull those on-demand feature builds into every gate run. It is a gate step only, not a per-commit hook: a doc build is heavier than the current hooks, and this class matters at the pre-PR checkpoint rather than mid-work.