-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Create website listing all the implemented lints and their info #819
Comments
rustc and clippy generate their documentation and Cargo is looking to do the same. No one hand-maintains the webpage. iirc clippy scrapes the code and generates it. Since Cargo isn't using a macro (yet?) for defining lints, I suggested to @Muscraft that we have a test or an xtask that calls into cargo-the-library to read the lints. For you, the lints are data-driven so you can just load all of the files. For generating, I think it would be good to see if a library could be made from clippy to accept a lint definition and generate it, so we all can share the same generator. |
Sharing the generator would be ideal! It would be pretty easy to parse the lints' information and plumb that through to the generator to make the website. |
Cargo's lint docs currently get generated by an xtask that reads fields from our |
Thanks for the links, super useful! |
A pragmatic suggestion: we could store lint documentation using doc comments. This would allow users to read lint docs offline using |
I don't think that would work, @SuperSonicHub1. Our lints are data, not types or functions, so there's no Rust item to which to attach the doc comment for each lint. In clippy, each lint has its own type. Here, we have one type for all lints, and we deserialize the lints themselves out of RON files into instances of that struct. |
Originally suggested here:
https://rust-lang.zulipchat.com/#narrow/stream/421156-gsoc/topic/Project.3A.20Adding.20lint.20configuration.20to.20cargo-semver-checks/near/452638414
This is a good idea! We need to look into what it would take to set this up and keep it maintained.
The text was updated successfully, but these errors were encountered: