Skip to content

chore(gate): add rustdoc-warnings doc-check step - #495

Merged
ultimatile merged 2 commits into
mainfrom
chore/494-rustdoc-gate
Jul 22, 2026
Merged

chore(gate): add rustdoc-warnings doc-check step#495
ultimatile merged 2 commits into
mainfrom
chore/494-rustdoc-gate

Conversation

@ultimatile

Copy link
Copy Markdown
Owner

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 a doc-check step 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 a doc-check task (RUSTDOCFLAGS='-D warnings' cargo doc --workspace --no-deps) and add it to the gate dependency 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 — backtick Complex<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 broken BlockSparseTensor::conj link to the resolvable crate::BlockSparseTensor::conj (broken_intra_doc_links).

Test plan

  • cargo make doc-check exits 0 (all four fixes clean; the re-pathed link resolves) — this is the exact command the gate step runs.
  • cargo make gate runs fmt-check + clippy + test + doc-check and passes.
  • Detection is confirmed by the pre-fix baseline: the tree failed this same command with exactly the four warnings the fixes remove.

Notes

The step runs default features only, matching clippy and test, so rustdoc warnings inside the feature-gated arpack / hptt doc 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.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-check task to Makefile.toml (sets RUSTDOCFLAGS="-D warnings") and wire it into gate.
  • 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@ultimatile
ultimatile merged commit cf7e8d0 into main Jul 22, 2026
1 check passed
@ultimatile
ultimatile deleted the chore/494-rustdoc-gate branch July 22, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a rustdoc warnings step to the gate task

2 participants