mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-25 20:07:21 +00:00
Merge pull request #870 from Manishearth/fix-722
allow items_after_statements by default
This commit is contained in:
commit
d7f7c9c460
3 changed files with 3 additions and 3 deletions
|
@ -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
|
[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_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
|
[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
|
[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_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
|
[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
|
||||||
|
|
|
@ -28,7 +28,7 @@ use utils::in_macro;
|
||||||
/// ```
|
/// ```
|
||||||
declare_lint! {
|
declare_lint! {
|
||||||
pub ITEMS_AFTER_STATEMENTS,
|
pub ITEMS_AFTER_STATEMENTS,
|
||||||
Warn,
|
Allow,
|
||||||
"finds blocks where an item comes after a statement"
|
"finds blocks where an item comes after a statement"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -244,6 +244,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
|
||||||
booleans::NONMINIMAL_BOOL,
|
booleans::NONMINIMAL_BOOL,
|
||||||
enum_glob_use::ENUM_GLOB_USE,
|
enum_glob_use::ENUM_GLOB_USE,
|
||||||
if_not_else::IF_NOT_ELSE,
|
if_not_else::IF_NOT_ELSE,
|
||||||
|
items_after_statements::ITEMS_AFTER_STATEMENTS,
|
||||||
matches::SINGLE_MATCH_ELSE,
|
matches::SINGLE_MATCH_ELSE,
|
||||||
mem_forget::MEM_FORGET,
|
mem_forget::MEM_FORGET,
|
||||||
methods::OPTION_UNWRAP_USED,
|
methods::OPTION_UNWRAP_USED,
|
||||||
|
@ -297,7 +298,6 @@ pub fn plugin_registrar(reg: &mut Registry) {
|
||||||
formatting::SUSPICIOUS_ELSE_FORMATTING,
|
formatting::SUSPICIOUS_ELSE_FORMATTING,
|
||||||
functions::TOO_MANY_ARGUMENTS,
|
functions::TOO_MANY_ARGUMENTS,
|
||||||
identity_op::IDENTITY_OP,
|
identity_op::IDENTITY_OP,
|
||||||
items_after_statements::ITEMS_AFTER_STATEMENTS,
|
|
||||||
len_zero::LEN_WITHOUT_IS_EMPTY,
|
len_zero::LEN_WITHOUT_IS_EMPTY,
|
||||||
len_zero::LEN_ZERO,
|
len_zero::LEN_ZERO,
|
||||||
lifetimes::NEEDLESS_LIFETIMES,
|
lifetimes::NEEDLESS_LIFETIMES,
|
||||||
|
|
Loading…
Add table
Reference in a new issue