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

Render documentation of lints #49416

Closed
2 tasks
killercup opened this issue Mar 27, 2018 · 6 comments
Closed
2 tasks

Render documentation of lints #49416

killercup opened this issue Mar 27, 2018 · 6 comments
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools

Comments

@killercup
Copy link
Member

Each of the Clippy lints is documented and the clippy docs are index (this one for the current version) that allows people to easily discover these lints. We should make the rustc built-in lints discoverable in this way as well.

  • Provide tooling to render documentation similar to the Clippy one for the rustc build-in lints
    • generate docs that live next to the error index?
  • We should add documentation to each of the built-in lints
    • might be inspired by Clippy's style
    • provide reasoning and example
@GuillaumeGomez
Copy link
Member

We should definitely have such a thing. (maybe even extended to other things like compiler options?)

I suggest to generate a markdown file which will then be converted into HTML by rustdoc. Taking a look at how clippy's generated its own file (if that's how it's done) would be a good idea too.

@frewsxcv frewsxcv added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Mar 28, 2018
@markmmm
Copy link

markmmm commented May 13, 2018

@GuillaumeGomez Is this done now that lints are documented in the Rustc book?

@GuillaumeGomez
Copy link
Member

cc @steveklabnik

@steveklabnik
Copy link
Member

Yes, this is done. New lints should get new docs; if any are missing, feel free to open one issue per lint.

@killercup
Copy link
Member Author

This book? Where's the section on lints?

@steveklabnik
Copy link
Member

It hits stable in the next release: https://doc.rust-lang.org/beta/rustc/lints/index.html

(This is distinct from that book; that's the contribution guide, this is the user guide)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools
Projects
None yet
Development

No branches or pull requests

5 participants