Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion declare_clippy_lint/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ impl LintListBuilder {

pub fn register(self, store: &mut LintStore) {
store.register_lints(&self.lints);
store.register_group(true, "clippy::all", Some("clippy_all"), self.all);
store.register_group(true, "clippy::default", Some("clippy_all"), self.all);
store.register_group_alias("clippy::default", "clippy::all");
store.register_group(true, "clippy::cargo", Some("clippy_cargo"), self.cargo);
store.register_group(true, "clippy::complexity", Some("clippy_complexity"), self.complexity);
store.register_group(
Expand Down
11 changes: 11 additions & 0 deletions tests/ui/clippy_all_group.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Tests that `clippy::all` still works without a deprecation warning
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to intrude, but why don't you want a deprecation warning?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's starting as a soft deprecation since it's very widely used, it may eventually become a warning

Copy link
Member

@flip1995 flip1995 Apr 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not deprecate it. I don't think it is ever worth to do so. I think clippy::all is older than 5 years by now. It will take at least the same amount of time until clippy::default is used in more places than clippy::all, I would think. So maybe really really long-term, we can deprecate it. But that might even be the decision of a different set of people by then.

Plus, I don't see any downsides in keeping it.


//@require-annotations-for-level: WARN

#![deny(clippy::all)]

fn f() {
"a".replace("a", "a");
//~^ no_effect_replace
//~| NOTE: implied by `#[deny(clippy::all)]`
}
15 changes: 15 additions & 0 deletions tests/ui/clippy_all_group.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
error: replacing text with itself
--> tests/ui/clippy_all_group.rs:8:5
|
LL | "a".replace("a", "a");
| ^^^^^^^^^^^^^^^^^^^^^
|
note: the lint level is defined here
--> tests/ui/clippy_all_group.rs:5:9
|
LL | #![deny(clippy::all)]
| ^^^^^^^^^^^
= note: `#[deny(clippy::no_effect_replace)]` implied by `#[deny(clippy::all)]`

error: aborting due to 1 previous error