Skip to content

docs: fix 50 intra-doc warnings + gate CI on -D warnings#32

Merged
maxine-at-forecast merged 1 commit into
mainfrom
feature/doc-link-cleanup
May 24, 2026
Merged

docs: fix 50 intra-doc warnings + gate CI on -D warnings#32
maxine-at-forecast merged 1 commit into
mainfrom
feature/doc-link-cleanup

Conversation

@maxine-at-forecast
Copy link
Copy Markdown
Collaborator

Summary

  • Fix every intra-doc warning across the workspace (44 with default cargo doc, 50 with --document-private-items)
  • Tighten CI doc job to RUSTDOCFLAGS=-D warnings so future regressions are caught at PR time

Closes #347.

Categories of fix

  • Unresolved FerroError::* in ferrolearn-core::backend — qualified as crate::FerroError::* (12 sites in trait method docs).
  • Redundant explicit link targets — dropped (target) suffix where the label already resolves; covers core, linear, cluster, kernel.
  • Public docs linking to private items — converted to plain backticks with prose context (io::ModelEnvelope/SCHEMA_VERSION, bayes::MIN_OBS_VAR, neighbors::kneighbors_impl + compute_lof).
  • Feature-gated module referencesonnx/pmml/backend_blas aren't in scope when their feature is off; dropped the intra-doc link.
  • Macro vs module name collisions — disambiguated param_grid with macro@.
  • Function vs module name collisionsfn@graphical_lasso; learning_curve()/validation_curve() with trailing parens.
  • HTML-tag-like generics in private docs — wrap Array2<f64> etc. in backticks (python::conversions, metrics::clustering).
  • Self-relative referencesSelf::pairwise, Self::max_features_per_split.

CI

.github/workflows/ci.yml doc job now sets RUSTDOCFLAGS: -D warnings. The follow-up-PR comment that explained why warnings weren't strict has been removed.

Test plan

  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items — clean locally
  • cargo fmt --check — clean
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • CI fmt + clippy + test + doc all green

🤖 Generated with Claude Code

Fixes 44 cargo-doc warnings across the workspace (50 with
--document-private-items) so the CI doc job can run with
RUSTDOCFLAGS=-D warnings without spurious failures.

Fix categories:

- Unresolved intra-doc links to FerroError variants — qualify as
  crate::FerroError::* in ferrolearn-core/backend.rs (12 sites).
- Redundant explicit link targets where the label already resolves —
  drop the (target) suffix in core, linear, cluster, kernel.
- Public docs linking to private items — convert to plain backticks
  with prose context (ferrolearn-io ModelEnvelope/SCHEMA_VERSION,
  ferrolearn-bayes MIN_OBS_VAR, ferrolearn-neighbors kneighbors_impl
  + compute_lof).
- Feature-gated module references — drop intra-doc links for the
  feature-gated onnx/pmml/backend_blas modules (use backticks).
- Macro vs module name collisions — disambiguate with macro@ prefix
  (model-sel param_grid).
- Function vs module name collisions — disambiguate with fn@ prefix
  (covariance graphical_lasso) and trailing parens (model-sel
  learning_curve/validation_curve).
- HTML-tag-like generics in private doc strings — wrap in backticks
  (ferrolearn-python conversions Array2<f64> etc., ferrolearn-metrics
  E[MI] formula).
- Self-relative references — Self::pairwise, Self::max_features_per_split.

CI:

- ci.yml doc job: add `RUSTDOCFLAGS: -D warnings`, drop the
  follow-up-PR comment that now no longer applies.

Verified locally with:
  RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps \
    --document-private-items

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@maxine-at-forecast maxine-at-forecast merged commit e9d6069 into main May 24, 2026
4 checks passed
@maxine-at-forecast maxine-at-forecast deleted the feature/doc-link-cleanup branch May 24, 2026 18:30
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.

1 participant