-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Document lint configuration values in Clippy's book #9991
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
@rustbot claim I want to work on this issue. This will be my second PR. Thank you for all the help on the first one. |
Awesome! Please reach out if you need any assistance :) |
On the first task; here is what is in the README: Would you like something different than this? The readme links to this: https://rust-lang.github.io/rust-clippy/master/index.html#Configuration |
This is also in the book: |
Are you hoping for something similar to what is in the rustc book here: https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html |
Hey @tylerjw, thank you for picking up this issue!
No, that is the basic information where to put the files and the basic structure. Though, looking at it, I'd suggest updating the variable in question. Then there is a new convention (Or I'm trying to make it a convention) for list variables like disallowed-names = ["Test"] # -> ["Test"]
disallowed-names = ["Test", ".."] # -> ["Test", "foo", "baz", "quux"] It would be cool, if this could be mentioned as part of the description as well.
Yes, that was the goal of this issue. Basically, a list, with all configurations, their default values and which lints are effected. The lints should ideally also be links to Clippy's lint list. Ideally, this list should be generated automatically, that's why the metadata collection lint is linked above. You can use |
Deleteing my comment because I went and read the details on |
As to |
Here is a PR with both the change to remove |
If you saw this comment before I updated it, there were two options. I tried implementing both, and one proved to be much easier and had much less code, so I went with that approach. I'll submit a PR soon so you can play with it and see what you think. Here is my draft idea for the new config page in the docs: Configuration Options
|
I saw this comment before the PR. ^^ The output looks really cool. The only NIT is that I'd like the description column to be wider than it currently is. Maybe we can add
Even though I like the table look of your suggestion a lot. Would you be okay with creating a prototype for the example above? Then we can make screenshots and ask for more feedback on Zulip :) |
We have a few lints with configuration values, like borrow_as_ptr. We want to increase the visibility of these config values, to encourage the use of them.
As part of this, we'd like a chapter about configuring lints and having a list of available configurations with links to Clippy's lint list.
Tasks:
I'm open to mentoring this issue :)
CC: #9880
The text was updated successfully, but these errors were encountered: