-
Notifications
You must be signed in to change notification settings - Fork 1.6k
link from the lint in the docs to the code #1303
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
Comments
What? |
In the lint list ( https://github.com/Manishearth/rust-clippy#lints ) we link to the docs. The suggestion is to also link to the source code of the lint. |
Most users should not need this, and having two links in that already quite big table would be confusing 😕 |
I know, but it could be like the src link in rustdocs, just a small thing. Well the source is the line where the lint name is mentioned ;) |
Which one? |
We can link to a github search url on the clippy repo, that'll list all the use sites |
Y'all have a lint workshop? What's it all about? 😀 |
/me jelly. 🤗 |
I taught ppl how to write clippy lints. But the wireless was down all the time, so it was hard. Also we have a lot of work ahead of us to improve the lint writing experience for new ppl. I've already got a few ideas that I'll explore. |
@rustbot claim |
…, r=xFrednet A metadata collection monster This PR introduces a metadata collection lint as discussed in #4310. It currently collects: * The lint ID * The lint declaration file and location (for #1303) * The lint group * The documentation * The applicability (if resolvable) * If the suggestion is a multi-part-suggestion This data has a slightly different structure than the current [lints.json](https://github.com/rust-lang/rust-clippy/blob/gh-pages/master/lints.json) and doesn't include depreciated lints yet. I plan to adapt the website to the new format and include depreciated lints in a follow-up PR :). The current collected json looks like this: [metadata_collection.json](https://gist.github.com/xFrednet/6b9e2c3f725f476ba88db9563f67e119) The entire implementation is guarded behind the `metadata-collector-lint` feature and the `ENABLE_METADATA_COLLECTION` environment value to prevent default collection. You can test the implementation via: ```sh $ ENABLE_METADATA_COLLECTION=1 cargo test --test dogfood --all-features ``` changelog: none --- The size of this PR sadly also grew into a small monster, sorry! I definitely plan to improve on this! And it's totally okay if you take your time with this :) r? `@phansch` cc: `@flip1995`
…ormat, r=flip1995 Adapting the lint list to Clippy's new metadata format This is close to the end of a long living project to rewrite the lint metadata collection for Clippy. Progress on this has been tracked in rust-lang#7172. This PR adds one of the last missing puzzle pieces, the actual display of all the changes that have been done in the background. A preview can be seen here: [Clippy's lint list](https://xfrednet.github.io/rust-clippy/master/index.html) The styling has been discussed on [zulip](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Styling.20feedback.20for.20Clippy's.20lint.20list/near/239601067) but is still open to suggestion. Side note: It has been fun working on the website where we don't have unit tests and everything is just tested by playing around. However, it's good that this chaos is contained into this one part of Clippy. 🐛 --- Closes: rust-lang#1303 Closes: rust-lang#4310 This actually closes fewer things than I thought it would... changelog: Reworked Clippy's [website](https://rust-lang.github.io/rust-clippy/master/index.html): changelog: * Added applicability information about lints changelog: * Added a link to jump to the specific lint implementation changelog: * Adapted some styling and improved loading time r? `@flip1995`
The idea came up in the lint workshop at rustbeltrust
We could simply generate a github search link to the uppercase name of the lint
The text was updated successfully, but these errors were encountered: