Skip to content

ci: deny rustdoc warnings in lint-and-test#296

Merged
iainmcgin merged 4 commits into
mainfrom
iain/rustdoc-ci-check
Jul 10, 2026
Merged

ci: deny rustdoc warnings in lint-and-test#296
iainmcgin merged 4 commits into
mainfrom
iain/rustdoc-ci-check

Conversation

@iainmcgin

Copy link
Copy Markdown
Collaborator

What this does

Adds a strict rustdoc gate to CI: RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps as a step in the existing lint-and-test job (which already has the toolchain, protoc, and build cache it needs).

Because buffa-test include!s codegen output covering views, lazy views, json, and reflect configurations, documenting the workspace runs the intra-doc-link lints over generated doc comments as well as hand-written ones — so both warning classes fixed in #295 (public docs linking private items, and broken links emitted into generated lazy-view docs) are caught going forward.

Also:

  • task doc — local mirror of the CI step, folded into task verify, so the gate is reproducible before pushing.
  • lint-and-test timeout 10 → 15 minutes to absorb the doc pass on a cold cache.
  • CONTRIBUTING's CI job list updated to mention the gate.

Depends on #295

Draft until #295 lands: the step fails on current main (that PR fixes the existing warnings). Verified both directions locally:

Coverage note

Workspace-excluded crates (benchmarks/*, most of examples/*) are not documented, so generated code checked into those crates is outside this gate. The step comment says so explicitly.

Add a strict rustdoc pass (RUSTDOCFLAGS=-D warnings, --workspace
--all-features --no-deps) to the lint-and-test job. Because buffa-test
include!s codegen output (views, lazy views, json, reflect), this lints
doc comments emitted by the code generator as well as hand-written ones,
catching broken or private intra-doc links of the kind fixed in #295.

Add a matching `task doc` so the gate is reproducible locally, fold it
into `task verify`, and bump the job timeout to absorb the doc pass on
a cold cache.

No-Verification-Needed: CI/tooling-only change, no runtime surface
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

iainmcgin and others added 3 commits July 9, 2026 10:33
Give `task doc` a three-way protoc precedence: explicit $PROTOC, then
.local/bin/protoc when present, then the system protoc. The .local
binary (from install-protoc) lets buffa-test generate its edition 2024
protos — and thus lets rustdoc lint their generated docs — even when
the system protoc is too old, matching what CI sees.

Deliberately not `deps: [install-protoc]`: go-task evaluates
preconditions even when a dep's status is satisfied, so that would make
`task verify` demand gh auth on every run. The flags are command-line
assignments rather than task-level `env:` because the OS environment
outranks `env:` — an exported RUSTDOCFLAGS would silently drop
-D warnings.

No-Verification-Needed: Taskfile-only tooling change, no runtime surface
@iainmcgin iainmcgin marked this pull request as ready for review July 10, 2026 02:13
@iainmcgin iainmcgin enabled auto-merge July 10, 2026 02:13
@iainmcgin iainmcgin requested a review from azdagron July 10, 2026 02:14
@iainmcgin iainmcgin added this pull request to the merge queue Jul 10, 2026
Merged via the queue into main with commit a09993c Jul 10, 2026
9 checks passed
@iainmcgin iainmcgin deleted the iain/rustdoc-ci-check branch July 10, 2026 16:14
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants