diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2021-06-14 10:01:43 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2021-06-25 08:53:29 -0500 |
| commit | 7e21db5b5c18f47a5f43e36f0bf34f1bbd1a1466 (patch) | |
| tree | e90d84daa54a23d8ecb6dc06ee67a932ae99452c /clippy_lints/src/lib.rs | |
| parent | 8d427b624f15a5c782c97021c3717451d86b8576 (diff) | |
| download | rust-7e21db5b5c18f47a5f43e36f0bf34f1bbd1a1466.tar.gz rust-7e21db5b5c18f47a5f43e36f0bf34f1bbd1a1466.zip | |
Add suspicious group
Diffstat (limited to 'clippy_lints/src/lib.rs')
| -rw-r--r-- | clippy_lints/src/lib.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/clippy_lints/src/lib.rs b/clippy_lints/src/lib.rs index 9cffeeb0224..4ce1d511d27 100644 --- a/clippy_lints/src/lib.rs +++ b/clippy_lints/src/lib.rs @@ -60,9 +60,9 @@ use rustc_session::Session; /// 4. The `description` that contains a short explanation on what's wrong with code where the /// lint is triggered. /// -/// Currently the categories `style`, `correctness`, `complexity` and `perf` are enabled by default. -/// As said in the README.md of this repository, if the lint level mapping changes, please update -/// README.md. +/// Currently the categories `style`, `correctness`, `suspicious`, `complexity` and `perf` are +/// enabled by default. As said in the README.md of this repository, if the lint level mapping +/// changes, please update README.md. /// /// # Example /// @@ -106,6 +106,11 @@ macro_rules! declare_clippy_lint { $(#[$attr])* pub clippy::$name, Deny, $description, report_in_external_macro: true } }; + { $(#[$attr:meta])* pub $name:tt, suspicious, $description:tt } => { + declare_tool_lint! { + $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true + } + }; { $(#[$attr:meta])* pub $name:tt, complexity, $description:tt } => { declare_tool_lint! { $(#[$attr])* pub clippy::$name, Warn, $description, report_in_external_macro: true |
