Skip to content
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

cargo check doesn't check documentation code fences #4565

Closed
thegranddesign opened this issue Oct 2, 2017 · 1 comment
Closed

cargo check doesn't check documentation code fences #4565

thegranddesign opened this issue Oct 2, 2017 · 1 comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-check

Comments

@thegranddesign
Copy link

thegranddesign commented Oct 2, 2017

Considering a lot of people would use the output of cargo check in their editors to verify correctness of their code before running their tests, one would assume that cargo check --all would run compiler checks of the code in the docs tests, unfortunately that doesn't seem to be the case.

Current Behavior

It's possible for cargo check --all to run clean but cargo test to fail with compiler errors.

Expected Behavior

When docs have code fences that have compiler errors:

cargo check --all

and a new command option:

cargo check --docs

would fail.

@carols10cents carols10cents added C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-check labels Oct 3, 2017
@carols10cents
Copy link
Member

Actually this looks like a duplicate of #3431 -- that issue is still open because cargo check --all does not include tests or doc tests. Closing as a duplicate, thank you for the report! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-check
Projects
None yet
Development

No branches or pull requests

2 participants