-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
In VSCode (and various other IDEs / tools - fzf, vim, etc.), reporting filenames in a format file:linenumber makes it easy to click to navigate to that location.
Format all doctest failures line numbers using file:number format.
Current output. The poor format appears at least 3 times in the output.
running 28 tests
test ratatui-macros/src/lib.rs - (line 104) ... FAILED
...snip
failures:
---- ratatui-macros/src/lib.rs - (line 104) stdout ----
error: expected one of `,`, `.`, `?`, `]`, or an operator, found `;`
--> ratatui-macros/src/lib.rs:115:6
...snip
failures:
ratatui-macros/src/lib.rs - (line 104)
Note that the line number of the error should be reported not the line number of the start of the doc test (but that's captured a sort of separate issue.
Alternatives:
It's possible that reporting some of these semantically makes more sense than as file locations, by reporting the module or function that the doctest is attached on rather than the line number.
Metadata
Metadata
Assignees
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Projects
Status
No status