Skip to content

Conversation

@Alexendoo
Copy link
Member

doc_link_code and doc_paragraphs_missing_punctuation are now state machines that take in the events from check_doc's markdown parser

changelog: none

@rustbot
Copy link
Collaborator

rustbot commented Nov 26, 2025

Some changes occurred in clippy_lints/src/doc

cc @notriddle

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Nov 26, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 26, 2025

r? @blyxyas

rustbot has assigned @blyxyas.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

self.start = Some(range.start);
}
self.includes_link = true;
},
Copy link
Contributor

@notriddle notriddle Nov 26, 2025

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;

Copy link
Member Author

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

Copy link
Member Author

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"

Copy link
Contributor

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.

@blyxyas
Copy link
Member

blyxyas commented Nov 27, 2025

Benchmarks results: Not noticeable (-0.15% on tokio)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants