Skip to content

Fix rustdoc #518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 24, 2023
Merged

Fix rustdoc #518

merged 5 commits into from
Apr 24, 2023

Conversation

almann
Copy link
Contributor

@almann almann commented Apr 22, 2023

Cleans up doc comments such that cargo doc --document-private-items --all-features works and is in CI.

Fixes #516

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

almann added 4 commits April 21, 2023 14:13
Adds a CI step to run `cargo doc` for all features and private items
going forward which will require all users to keep their rustdoc clean.

For the parts of the docs I cleaned up, I tried to put more code
references in an inline code fence--this is required for types with `<`
or `>`, but also the style I think we should use.  I did not go through
all the code to clean this up.
This is needed to get Rustdoc installed.
@codecov
Copy link

codecov bot commented Apr 22, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (4ccb027) 88.90% compared to head (fa13bbd) 88.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #518      +/-   ##
==========================================
- Coverage   88.90%   88.90%   -0.01%     
==========================================
  Files          81       81              
  Lines       12885    12885              
==========================================
- Hits        11456    11455       -1     
- Misses       1429     1430       +1     
Impacted Files Coverage Δ
src/binary/header.rs 0.00% <ø> (ø)
src/binary/non_blocking/binary_buffer.rs 95.67% <ø> (ø)
src/binary/non_blocking/raw_binary_reader.rs 89.21% <ø> (ø)
src/element/annotations.rs 100.00% <ø> (ø)
src/element/reader.rs 93.58% <ø> (ø)
src/element/struct.rs 100.00% <ø> (ø)
src/ion_hash/element_hasher.rs 98.00% <ø> (ø)
src/ion_hash/mod.rs 100.00% <ø> (ø)
src/ion_hash/representation.rs 99.06% <ø> (ø)
src/ion_hash/type_qualifier.rs 100.00% <ø> (ø)
... and 12 more

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -1,5 +1,6 @@
#![allow(dead_code)]
#![deny(rustdoc::broken_intra_doc_links)]
#![deny(rustdoc::bare_urls)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I've seen bare URL fixes elsewhere in this patch, but without accompanying additions of this linting directive.
From my reading just now I see that bare_urls is warn-by-default, so this makes me wonder what distinction we're drawing here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is saying Rustdoc will error when we make this mistake.

@@ -34,14 +34,14 @@ impl RawSymbolToken {
}
}

/// Constructs an [`OwnedSymbolToken`] with unknown text and a local ID.
/// Constructs a [`RawSymbolToken`] with unknown text and a local ID.
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@jobarr-amzn jobarr-amzn merged commit 3e34699 into amazon-ion:main Apr 24, 2023
@almann almann deleted the fix-rustdoc branch April 26, 2023 16:17
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.

Documenting Private Items Fails
2 participants