Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented Aug 6, 2024

This makes it so switching the internal feature on/off no longer rebuilds clippy_lints.

r? @flip1995

changelog: none

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 6, 2024
@Jarcho Jarcho force-pushed the internal_lint branch 2 times, most recently from 6274ff4 to 6320f1a Compare August 6, 2024 05:00
Copy link
Member

@flip1995 flip1995 left a 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.

@bors
Copy link
Contributor

bors commented Aug 6, 2024

☔ The latest upstream changes (presumably #13225) made this pull request unmergeable. Please resolve the merge conflicts.

@Jarcho Jarcho added the S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work label Aug 6, 2024
@Jarcho
Copy link
Contributor Author

Jarcho commented Aug 6, 2024

Marking this as blocked on #13221

@Jarcho Jarcho removed the S-blocked Status: marked as blocked ❌ on something else such as an RFC or other implementation work label Aug 20, 2024
@Jarcho
Copy link
Contributor Author

Jarcho commented Aug 20, 2024

r? rust-lang/clippy

This was simplified a bit by #13221.

@rustbot rustbot assigned y21 and unassigned flip1995 Aug 20, 2024
tests/dogfood.rs Outdated
Copy link
Member

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

@Jarcho Jarcho force-pushed the internal_lint branch 3 times, most recently from 8314085 to 34be10e Compare August 23, 2024 13:57
];

pub fn register_lints(store: &mut LintStore) {
store.register_lints(LINTS);
Copy link
Member

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?

Copy link
Contributor Author

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")].

@bors
Copy link
Contributor

bors commented Sep 4, 2024

☔ The latest upstream changes (presumably #13343) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot

This comment has been minimized.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Mar 31, 2025
@Jarcho Jarcho force-pushed the internal_lint branch 3 times, most recently from 72a5f4f to 03fa013 Compare April 12, 2025 10:41
@Jarcho
Copy link
Contributor Author

Jarcho commented Apr 12, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Apr 12, 2025
Copy link
Contributor

@samueltardieu samueltardieu left a 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)]
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@Jarcho
Copy link
Contributor Author

Jarcho commented Apr 12, 2025

Just removed the reference from the book. internal since it doesn't fit anymore nor are they common enough to really warrant making them easier.

@Jarcho Jarcho mentioned this pull request Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants