From e3d86800ffae3a88c1284d9bcfd45405f08e807a Mon Sep 17 00:00:00 2001 From: Andre Bogus Date: Sat, 23 Apr 2016 07:50:46 +0200 Subject: [PATCH] allow items_after_statements by default --- README.md | 2 +- src/items_after_statements.rs | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 80d5c2825..59724457a 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ name [inline_always](https://github.com/Manishearth/rust-clippy/wiki#inline_always) | warn | `#[inline(always)]` is a bad idea in most cases [invalid_regex](https://github.com/Manishearth/rust-clippy/wiki#invalid_regex) | deny | finds invalid regular expressions in `Regex::new(_)` invocations [invalid_upcast_comparisons](https://github.com/Manishearth/rust-clippy/wiki#invalid_upcast_comparisons) | warn | a comparison involving an upcast which is always true or false -[items_after_statements](https://github.com/Manishearth/rust-clippy/wiki#items_after_statements) | warn | finds blocks where an item comes after a statement +[items_after_statements](https://github.com/Manishearth/rust-clippy/wiki#items_after_statements) | allow | finds blocks where an item comes after a statement [iter_next_loop](https://github.com/Manishearth/rust-clippy/wiki#iter_next_loop) | warn | for-looping over `_.next()` which is probably not intended [len_without_is_empty](https://github.com/Manishearth/rust-clippy/wiki#len_without_is_empty) | warn | traits and impls that have `.len()` but not `.is_empty()` [len_zero](https://github.com/Manishearth/rust-clippy/wiki#len_zero) | warn | checking `.len() == 0` or `.len() > 0` (or similar) when `.is_empty()` could be used instead diff --git a/src/items_after_statements.rs b/src/items_after_statements.rs index 952dcb7ed..9d8ae2e99 100644 --- a/src/items_after_statements.rs +++ b/src/items_after_statements.rs @@ -28,7 +28,7 @@ use utils::in_macro; /// ``` declare_lint! { pub ITEMS_AFTER_STATEMENTS, - Warn, + Allow, "finds blocks where an item comes after a statement" } diff --git a/src/lib.rs b/src/lib.rs index 5f3b3999f..14d1a19f2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -244,6 +244,7 @@ pub fn plugin_registrar(reg: &mut Registry) { booleans::NONMINIMAL_BOOL, enum_glob_use::ENUM_GLOB_USE, if_not_else::IF_NOT_ELSE, + items_after_statements::ITEMS_AFTER_STATEMENTS, matches::SINGLE_MATCH_ELSE, mem_forget::MEM_FORGET, methods::OPTION_UNWRAP_USED, @@ -297,7 +298,6 @@ pub fn plugin_registrar(reg: &mut Registry) { formatting::SUSPICIOUS_ELSE_FORMATTING, functions::TOO_MANY_ARGUMENTS, identity_op::IDENTITY_OP, - items_after_statements::ITEMS_AFTER_STATEMENTS, len_zero::LEN_WITHOUT_IS_EMPTY, len_zero::LEN_ZERO, lifetimes::NEEDLESS_LIFETIMES,