-
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
add lint against unit tests in doctests #11872
Conversation
r? @xFrednet (rustbot has picked a reviewer for you, use r? to override) |
1b1347b
to
5a93643
Compare
@rustbot author I want to extend the span to also cover the signature (otherwise it will only show the attr) and avoid limiting on |
5a93643
to
bae5e2e
Compare
@rustbot review I've now decided to limit the span to the item ident, which ensures it'll be in the message without potentially taking lots of lines that the declaration may take. I'm also thinking about renaming the |
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.
LGTM, two small nits and then it should be good :D
bae5e2e
to
0ba9bf9
Compare
@xFrednet thanks for the quick review! Your nits should be gone now. |
LGTM, thank you! Nice new lint! @bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
During RustLab, Alice Ryhl brought to my attention that the Andoid team stumbled over the fact that if one attempts to write a unit test within a doctest, it will be summarily ignored. So this lint should help people wondering why their tests won't run.
changelog: New lint: [
test_attr_in_doctest
]#11872