Repository navigation
Support lint tool names in rustc command line options - #86639
Conversation
commented
Jun 25, 2021
|
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
commented
Jun 30, 2021
|
Does this mean we no longer need |
commented
Jun 30, 2021
It shoudn't have any change there. This simply makes it so you can do |
commented
Jul 1, 2021
|
The |
commented
Jul 2, 2021
|
Thanks for the comments, @petrochenkov. I removed the rust-analyzer submodule update. |
commented
Jul 2, 2021
|
@rustbot label -S-waiting-on-author +S-waiting-on-review |
This comment has been minimized.
This comment has been minimized.
This adds a ui test to make sure rustc accepts lint arguments such as `-A clippy::foo` when clippy is disabled.
This shares a little more code between checking command line and attribute lint specifications.
commented
Jul 7, 2021
|
This is a little better now, although probably not quite ready to merge. I think there's some more cleanup still to do. Is it at least on the right path for solving the problem? I'm also having an issue with my tests. Even after adding the |
This comment has been minimized.
This comment has been minimized.
commented
Jul 7, 2021
The tests are missing |
commented
Jul 7, 2021
|
Tests need some adjustments, but otherwise LGTM. |
Previously this was using a `.stderr` file, but that does not seem to work for all cases. This change uses `// error-pattern:` instead.
This comment has been minimized.
This comment has been minimized.
This change merges `check_lint_and_tool_name` into `check_lint_name` in order to avoid having two very similar functions. Also adds the `.stderr` file back for the test case, since apparently it is still needed.
|
Okay, this should be ready to go now. @rustbot label -S-waiting-on-author +S-waiting-on-review |
commented
Jul 7, 2021
|
Thanks! |
commented
Jul 7, 2021
|
📌 Commit 4a83a93 has been approved by |
When rustc is running without a lint tool such as clippy enabled, options for lints such as
clippy::fooare meant to be ignored. This was already working for those specified by attrs, such as#![allow(clippy::foo)], but this did not work for command line arguments like-A clippy::foo. This PR fixes that issue.Note that we discovered this issue while discussing rust-lang/cargo#5034.
Fixes #86628.