-
Notifications
You must be signed in to change notification settings - Fork 1.7k
We should extend --explain
to include config options
#9990
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
fix codeblocks in the document While I've looked into #9990, I found broken code blocks in the document. This patch not only improves visibility, but also fixes a potential bug. When a lint description ends with code block, the string will have three backquotes at the end. Since the current implementation prints the default value immediately after that, the markdown renderer is unable to properly close the code block. e.g. `arithmetic_side_effects`, we can see code block is not rendered properly, and (I think) it's bit hard to understand what ``"defaults to `[]`"`` is meant.  In this PR, it will be rendered as:  changelog: none r? `@xFrednet`
This would require moving Btw, why does this feature ( If the feature exists because of compile-times, maybe we should remove it as between times from |
It would be good if we could find a way, to connect the data without enabling all internal lints. But this can include enabling some code from the metadata collection monster by default. This mainly involves connecting the configs to the lint documentation and should be relatively simple.
I'm not 100% sure, but my guess is a combination of these factors:
The metadata collection monster was the first bigger project I worked on in Clippy/rust-lang. Looking at the code takes me back. I also love how it was okay to have more stupid comments in that code :D |
@rustbot claim |
Clippy has an
--explain
command to display the lint documentation in the console. Ideally, we'd like to expand the command to include the configurations, which effect the lint emission. This is already done for Clippy's lint list.Here is an example for such a lint: borrow_as_ptr
This implementation could take inspiration from how we collect the metadata for our lint list:
rust-clippy/clippy_lints/src/utils/internal_lints/metadata_collector.rs
Line 162 in 3cf2c17
CC: #9880
The text was updated successfully, but these errors were encountered: