-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add avoid_breaking_exported_api config option #7187
Conversation
r? @phansch (rust-highfive has picked a reviewer for you, use r? to override) |
9a8dacd
to
7895c50
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't reviewed it in-depth (just reviewed the "infra"-impact), but this looks like a great improvement of Clippy. Thanks!
I added some cleanup to the compiletest to call |
e705584
to
01a6fdb
Compare
☔ The latest upstream changes (presumably #7215) made this pull request unmergeable. Please resolve the merge conflicts. |
91ddf0e
to
7e0714b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! The implementation looks good to me. My only concern is that we don't have tests for when the option is set to false. I think this might be a general problem though, and I wouldn't object to merging the PR anyway. What do you think?
☔ The latest upstream changes (presumably #7252) made this pull request unmergeable. Please resolve the merge conflicts. |
7e0714b
to
8fd4cb3
Compare
Rebased with your comment. You're right that |
8fd4cb3
to
6eea598
Compare
Thanks! |
📌 Commit 6eea598 has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
changelog: Add
avoid_breaking_exported_api
config option for [enum_variant_names
], [large_types_passed_by_value
], [trivially_copy_pass_by_ref
], [unnecessary_wraps
], [upper_case_acronyms
] and [wrong_self_convention
].changelog: Deprecates [
pub_enum_variant_names
] and [wrong_pub_self_convention
] as the non-pub variants are now configurable.changelog: Fix various false negatives for
pub
items that are not exported from the crate.A couple changes to late passes in order to use
cx.access_levels.is_exported
rather thanitem.vis.kind.is_pub
.I'm not sure how to better document the config option or lints that are (not) affected (see comments in #6806). Suggestions are welcome. cc @rust-lang/clippy
I added
/clippy.toml
to use the config internally and/tests/clippy.toml
to maintain a default config in ui tests.Closes #6806
Closes #4504