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

Lint missing_intra_doc_link #43

Open
Veetaha opened this issue Jul 28, 2023 · 0 comments
Open

Lint missing_intra_doc_link #43

Veetaha opened this issue Jul 28, 2023 · 0 comments
Labels
A-user-story Area: A user story or a related issue

Comments

@Veetaha
Copy link

Veetaha commented Jul 28, 2023

Lint explanation

Detect references in comments of form `foo` where foo path is reachable in the current scope and thus the reference could be made into an intra-doc link. The reasoning is that references to other symbols will be highlighted and enriched with a link in the generated documentation. The intra-doc link will also be validated by rustdoc to stay valid, so this way the comment that references some paths will be guaranteed to have valid references.

Example code

Bad

/// This struct implements `crate::TraitName` in such a way that it does foo.
struct Foo;

Good

/// This struct implements [`crate::TraitName`] in such a way that it does foo.
struct Foo;
@Veetaha Veetaha added the A-user-story Area: A user story or a related issue label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-user-story Area: A user story or a related issue
Projects
None yet
Development

No branches or pull requests

1 participant