-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
doc_nested_refdefs: new lint for suspicious list syntax #13707
Conversation
8af734f
to
eb228e7
Compare
☔ The latest upstream changes (presumably 8298da7) made this pull request unmergeable. Please resolve the merge conflicts. |
Is |
|
eb228e7
to
fbd39d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of little things, but otherwise looks good.
Could you also add this check to block quotes as well since they have the same issue. I would just put them under a single lint named either doc_nested_reference_definitions
or doc_nested_refdefs
(I don't have a preference on whether to use the shorthand).
FCP has received no objections so this should be good to go.
That's rather unfortunate that these don't show up in the parser at all. |
This is more likely to be intended as an intra-doc link than it is to be intended as a refdef. If a refdef is intended, it does not need to be nested within a list item or quote. ```markdown - [`LONG_INTRA_DOC_LINK`]: this looks like an intra-doc link, but is actually a refdef. The first line will seem to disappear when rendered as HTML. ```
fbd39d3
to
61c1cc1
Compare
Co-Authored-By: Jason Newcomb <[email protected]>
61c1cc1
to
8dd45f1
Compare
Okay, I've made both changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
rust-lang/rust#133150
This is more likely to be intended as an intra-doc link than it is to be intended as a refdef. If a refdef is intended, it does not need to be nested within a list item.
changelog: [
doc_nested_refdefs
]: add suspicious lint for link def at start of list items and block quotes