-
Notifications
You must be signed in to change notification settings - Fork 1.6k
doc_suspicious_footnotes: lint text that looks like a footnote #14708
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
base: master
Are you sure you want to change the base?
Conversation
9f74df2
to
c56ef28
Compare
c56ef28
to
1356e76
Compare
Looks good to me, thanks! r? samueltardieu |
samueltardieu is on vacation. Please choose another assignee. |
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.
Great initial patch (and a really good lint idea 👍)! I left some suggestions and some questions.
/// | ||
/// This is a footnote[^2]. | ||
/// | ||
/// [^2]: hello world |
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.
Could this also check for #![doc]
, //!
, #[doc]
and the include!
s macros?
@blyxyas Okay, I've implemented variants on all your suggestions. |
b0e3325
to
99b16ae
Compare
changelog: [
doc_suspicious_footnotes
]: lint for text that looks like a footnote reference but has no definitionThis is an alternative to rust-lang/rust#137803, meant to address the concerns about false positives.
This lint only fires when the apparent footnote reference has a name that's made from pure ASCII digits. This choice is justified by running lintcheck on the top 200 crates, plus the clippy default set:
cargo
uses one in its job_queue module, and that's all it found.cc @GuillaumeGomez