Skip to content
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

feat(cli/rustup-mode): allow rustup doc with both a flag and a topic #4070

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

rami3l
Copy link
Member

@rami3l rami3l commented Nov 9, 2024

This PR is my stab at the concern in #4069.

However, I think rustup should not magically detect and acknowledge lints, so I've made a more neutral solution that might apply to more topics:

Does rustup doc --rustdoc lints::broken_intra_doc_links look okay to you?

I mean, we can try with the following semantics with lints::broken_intra_doc_links:

  1. Look for lints/broken_intra_doc_links/index.html.
  2. Look for lints/broken_intra_doc_links.html.
  3. Look for lints.html. If it exists, resolve to lints.html#broken_intra_doc_links.
  4. Throw an error.

PS: I have manually verified that this algorithm, if implemented correctly, will work with rustc, rustdoc and clippy books.
#4069 (comment)

Concerns

  • Should we add test cases for this PR, and how may we add them? Added --path tests to ensure that we can get the doc paths right.

@rami3l rami3l requested a review from djc November 26, 2024 14:00
@rami3l rami3l marked this pull request as ready for review November 26, 2024 14:01
@rami3l
Copy link
Member Author

rami3l commented Nov 26, 2024

PS: The CI failures seem irrelevant to the changes being made in this PR.

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