make nonminimal_bool allow-by-default

This commit is contained in:
Oliver Schneider 2016-03-30 12:55:59 +02:00
parent fa48ee678a
commit 2917484130
3 changed files with 5 additions and 5 deletions

View file

@ -9,11 +9,11 @@ use utils::{span_lint_and_then, in_macro, snippet_opt, SpanlessEq};
///
/// **Why is this bad?** Readability of boolean expressions suffers from unnecesessary duplication
///
/// **Known problems:** Ignores short circuting behavior, bitwise and/or and xor. Ends up suggesting things like !(a == b)
/// **Known problems:** Ignores short circuting behavior of `||` and `&&`. Ignores `|`, `&` and `^`.
///
/// **Example:** `if a && true` should be `if a`
/// **Example:** `if a && true` should be `if a` and `!(a == b)` should be `a != b`
declare_lint! {
pub NONMINIMAL_BOOL, Warn,
pub NONMINIMAL_BOOL, Allow,
"checks for boolean expressions that can be written more concisely"
}

View file

@ -235,6 +235,7 @@ pub fn plugin_registrar(reg: &mut Registry) {
reg.register_lint_group("clippy_pedantic", vec![
array_indexing::INDEXING_SLICING,
booleans::NONMINIMAL_BOOL,
enum_glob_use::ENUM_GLOB_USE,
matches::SINGLE_MATCH_ELSE,
methods::OPTION_UNWRAP_USED,
@ -268,7 +269,6 @@ pub fn plugin_registrar(reg: &mut Registry) {
block_in_if_condition::BLOCK_IN_IF_CONDITION_EXPR,
block_in_if_condition::BLOCK_IN_IF_CONDITION_STMT,
booleans::LOGIC_BUG,
booleans::NONMINIMAL_BOOL,
collapsible_if::COLLAPSIBLE_IF,
copies::IF_SAME_THEN_ELSE,
copies::IFS_SAME_COND,