Skip to content

Commit 8025de0

Browse files
committed
fixup! Add suspicious group
1 parent db52f81 commit 8025de0

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ You can choose how much Clippy is supposed to ~~annoy~~ help you by changing the
1313
| Category | Description | Default level |
1414
| --------------------- | ----------------------------------------------------------------------- | ------------- |
1515
| `clippy::all` | all lints that are on by default (correctness, style, complexity, perf) | **warn/deny** |
16-
| `clippy::correctness` | code that is outright wrong or very useless | **deny** |
16+
| `clippy::correctness` | code that is outright wrong or useless | **deny** |
17+
| `clippy::suspicious` | code that most likely wrong or useless | **warn** |
1718
| `clippy::style` | code that should be written in a more idiomatic way | **warn** |
1819
| `clippy::complexity` | code that does something simple but in a complex way | **warn** |
1920
| `clippy::perf` | code that can be written to run faster | **warn** |
20-
| `clippy::suspicious` | code that seems very likely to be incorrect | **warn** |
2121
| `clippy::pedantic` | lints which are rather strict or might have false positives | allow |
2222
| `clippy::nursery` | new lints that are still under development | allow |
2323
| `clippy::cargo` | lints for the cargo manifest | allow |

clippy_dev/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ fn get_clap_config<'a>() -> ArgMatches<'a> {
123123
.possible_values(&[
124124
"style",
125125
"correctness",
126+
"suspicious",
126127
"complexity",
127128
"perf",
128-
"suspicious",
129129
"pedantic",
130130
"restriction",
131131
"cargo",

clippy_dev/src/update_lints.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub fn run(update_mode: UpdateMode) {
9494
let all_group_lints = usable_lints.iter().filter(|l| {
9595
matches!(
9696
&*l.group,
97-
"correctness" | "style" | "complexity" | "perf" | "suspicious"
97+
"correctness" | "suspicious" | "style" | "complexity" | "perf"
9898
)
9999
});
100100

clippy_lints/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ use rustc_session::Session;
6060
/// 4. The `description` that contains a short explanation on what's wrong with code where the
6161
/// lint is triggered.
6262
///
63-
/// Currently the categories `style`, `correctness`, `complexity`, `perf` and `suspicious` are
63+
/// Currently the categories `style`, `correctness`, `suspicious`, `complexity` and `perf` are
6464
/// enabled by default. As said in the README.md of this repository, if the lint level mapping
6565
/// changes, please update README.md.
6666
///
@@ -106,17 +106,17 @@ macro_rules! declare_clippy_lint {
106106
$(#[$attr])* pub clippy::$name, Deny, $description, report_in_external_macro: true
107107
}
108108
};
109-
{ $(#[$attr:meta])* pub $name:tt, complexity, $description:tt } => {
109+
{ $(#[$attr:meta])* pub $name:tt, suspicious, $description:tt } => {
110110
declare_tool_lint! {
111111
$(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
112112
}
113113
};
114-
{ $(#[$attr:meta])* pub $name:tt, perf, $description:tt } => {
114+
{ $(#[$attr:meta])* pub $name:tt, complexity, $description:tt } => {
115115
declare_tool_lint! {
116116
$(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
117117
}
118118
};
119-
{ $(#[$attr:meta])* pub $name:tt, suspicious, $description:tt } => {
119+
{ $(#[$attr:meta])* pub $name:tt, perf, $description:tt } => {
120120
declare_tool_lint! {
121121
$(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true
122122
}

clippy_lints/src/utils/internal_lints/metadata_collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ const DEPRECATED_LINT_LEVEL: &str = "none";
4848
/// lint level for deprecated lints is set in `DEPRECATED_LINT_LEVEL`.
4949
const DEFAULT_LINT_LEVELS: &[(&str, &str)] = &[
5050
("correctness", "deny"),
51+
("suspicious", "warn"),
5152
("restriction", "allow"),
5253
("style", "warn"),
5354
("pedantic", "allow"),
5455
("complexity", "warn"),
5556
("perf", "warn"),
56-
("suspicious", "warn"),
5757
("cargo", "allow"),
5858
("nursery", "allow"),
5959
];

util/lintlib.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919

2020
lint_levels = {
2121
"correctness": 'Deny',
22+
"suspicious": 'Warn',
2223
"style": 'Warn',
2324
"complexity": 'Warn',
2425
"perf": 'Warn',
25-
"suspicious": 'Warn',
2626
"restriction": 'Allow',
2727
"pedantic": 'Allow',
2828
"nursery": 'Allow',

0 commit comments

Comments
 (0)