-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Move internal lints to their own crate #13223
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
Conversation
6274ff4 to
6320f1a
Compare
flip1995
left a comment
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.
I like those changes. Splitting up Clippy definitely makes sense. We might also want to look into turning Clippy into a workspace, like cargo did. I think @xFrednet wanted to look into this.
|
☔ The latest upstream changes (presumably #13225) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Marking this as blocked on #13221 |
|
r? rust-lang/clippy This was simplified a bit by #13221. |
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.
Could do with adding the new crate to the list of dogfooded crates
8314085 to
34be10e
Compare
| ]; | ||
|
|
||
| pub fn register_lints(store: &mut LintStore) { | ||
| store.register_lints(LINTS); |
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.
This no longer registers the clippy::internal group. I assume that's intentional since it's not needed anymore for #![deny(clippy::internal)] in tests and -Dclippy::internal as all internal lints are now warn by default?
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.
The internal category is now completely gone. It was only really needed to mark some generated code with #[cfg(feature = "internal")].
|
☔ The latest upstream changes (presumably #13343) made this pull request unmergeable. Please resolve the merge conflicts. |
This comment has been minimized.
This comment has been minimized.
72a5f4f to
03fa013
Compare
|
@rustbot ready |
samueltardieu
left a comment
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.
The book references the utils/internal directory in development/defining_lints.md as being the directory where internal lints are stored. This should probably be updated.
| @@ -1,4 +1,4 @@ | |||
| #![deny(clippy::internal)] | |||
| #![deny(clippy::collapsible_span_lint_calls)] | |||
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.
Just because I'm curious, were changes like this necessitated by the move? Or is this just to clarify the deny's purpose?
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.
The internal category no longer exists.
|
Just removed the reference from the book. |
y21
left a comment
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.
LGTM
Based on #13223 Various refactoring on `clippy_dev` before upgrading rename and splitting `clippy_lints` into multiple crates. Some improvements: * The working directory is set to the root clippy directory. Running from a subdirectory was kind of supported before sometimes. Now it just works. * File won't be written unless they're actually updated. Most of the time they weren't written, but a few cases slipped through. * Buffers are reused more for the negligible speed boost. changelog: None
This makes it so switching the internal feature on/off no longer rebuilds
clippy_lints.r? @flip1995
changelog: none