Skip to content

Lint the doctests/examples code #1599

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

Open
Luthaf opened this issue Mar 4, 2017 · 2 comments
Open

Lint the doctests/examples code #1599

Luthaf opened this issue Mar 4, 2017 · 2 comments
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages

Comments

@Luthaf
Copy link

Luthaf commented Mar 4, 2017

I think it could be interesting to have cargo-clippy (maybe clippy too?) run the lints on the doctests/code examples for rustdoc. I don't know how hard this would be, but maybe some code from rustdoc could be reused to extract the code from the examples?

As clippy allow to keep a good code quality, I'd love to be able to run it on my examples too.

@llogiq
Copy link
Contributor

llogiq commented Mar 4, 2017

We'd have to coax rustdoc --test into compiling the examples w/ clippy.

@phansch phansch added the C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages label Oct 28, 2018
@phansch
Copy link
Member

phansch commented Nov 26, 2018

This is being tracked in Rust: rust-lang/rust#56232

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages
Projects
None yet
Development

No branches or pull requests

3 participants