-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Parse doc comment markdown only once #16144
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
|
Some changes occurred in clippy_lints/src/doc cc @notriddle |
| self.start = Some(range.start); | ||
| } | ||
| self.includes_link = true; | ||
| }, |
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.
There's a bug in this new version that isn't in the current version. Unfortunately, there's no test case for them in the code, but here's a couple of test cases that catch it (they pass in the main branch, but fail in this PR's branch):
/// `first`[`second`](https://example.com)[third](https://example.com)
//~^ ERROR: adjacent
pub struct FalseNegative;
/// `first`[](https://example.com)
pub struct FalsePositive;
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.
Thanks, it now verifies that links contain a single code and nothing, which catches a FP on:
`first`[`second` not code](x)Separate to this PR but I think it'd be worth moving out of nursery unless there's a known issue I'm missing
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.
As an aside what does the arst at the end of the test file lines mean? As a brit I cannot help but read it as "arsed"
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.
I use the Colemak layout, and arst just happens to be the left hand home row keys.
81d5301 to
ade32c1
Compare
ade32c1 to
fb579d1
Compare
|
Benchmarks results: Not noticeable (-0.15% on tokio) |
doc_link_codeanddoc_paragraphs_missing_punctuationare now state machines that take in the events fromcheck_doc's markdown parserchangelog: none