Skip to content

rustdoc: add --deny-doctest-warnings option #21316

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

Closed
wants to merge 4 commits into from

Conversation

pshc
Copy link
Contributor

@pshc pshc commented Jan 17, 2015

Collaboration with @rylev! Addresses #20787.

We kind of brute forced this flag into the call path for maketest, so we're soliciting better designs 👊

Also, we're wondering if we should turn this into a generic -D option, like @brson was saying. What would that look like? Would we have to implement all four flags (W, A, D, F)?

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@pshc pshc force-pushed the deny-doctest-warnings branch from 02d2c06 to 11f1b9b Compare January 17, 2015 21:07
@brson
Copy link
Contributor

brson commented Jan 18, 2015

Do you mind trying to turn this on for the in-tree doc tests as well? It looks like these are the lines to edit:

There's a chance that with the current state of the tree there will be a great number of warnings. If so we'll have to decide how to deal with them. make check-docs NO_MKFILE_DEPS=1 will run the doc tests quickly without rebuilding the whole tree because of the makefile change.

@brson
Copy link
Contributor

brson commented Jan 18, 2015

@alexcrichton What do you think of this command-line flag and having to support it indefinitely?

@pshc
Copy link
Contributor Author

pshc commented Jan 18, 2015

I'll give it a shot!

@pshc pshc force-pushed the deny-doctest-warnings branch from e2c73ea to b06e40a Compare January 18, 2015 01:06
@pshc pshc force-pushed the deny-doctest-warnings branch from b06e40a to f5f85e6 Compare January 18, 2015 06:27
@pshc
Copy link
Contributor Author

pshc commented Jan 18, 2015

It is done. 🎐

@alexcrichton
Copy link
Member

Would it be possible to use the same -D foo syntax that the compiler uses? That way this would actually just be rustdoc -D warnings ... and would mirror the compiler well (plus setting different various levels).

The options would have to be documented, however, as only applying to doctests rather than documentation in general.

@pshc
Copy link
Contributor Author

pshc commented Jan 18, 2015

@alexcrichton Sure thing.

@pshc
Copy link
Contributor Author

pshc commented Jan 18, 2015

@alexcrichton Oh, I didn't notice you said "options" the first time. Should I just hardcode -D warnings, or also provide -F and -A and -W?

@alexcrichton
Copy link
Member

I would probably add flags for all of -A, -F, -W, and -D to rustdoc and then our build system can pass -D warnings by default.

@alexcrichton
Copy link
Member

Closing due to inactivity, but feel free to reopen with a rebase!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants