new lint: needless_bool (TODO: The warnings could give more specific directions)

This commit is contained in:
llogiq 2015-05-02 00:35:49 +02:00
parent 3a9bf24bb3
commit 53fa76dff9
4 changed files with 69 additions and 3 deletions

View file

@ -18,6 +18,7 @@ pub mod types;
pub mod misc;
pub mod eq_op;
pub mod bit_mask;
pub mod needless_bool;
#[plugin_registrar]
pub fn plugin_registrar(reg: &mut Registry) {
@ -27,8 +28,10 @@ pub fn plugin_registrar(reg: &mut Registry) {
reg.register_lint_pass(box misc::TopLevelRefPass as LintPassObject);
reg.register_lint_pass(box eq_op::EqOp as LintPassObject);
reg.register_lint_pass(box bit_mask::BitMask as LintPassObject);
reg.register_lint_pass(box needless_bool::NeedlessBool as LintPassObject);
reg.register_lint_group("clippy", vec![types::BOX_VEC, types::LINKEDLIST,
misc::SINGLE_MATCH, misc::STR_TO_STRING,
misc::TOPLEVEL_REF_ARG, eq_op::EQ_OP,
bit_mask::BAD_BIT_MASK]);
bit_mask::BAD_BIT_MASK,
needless_bool::NEEDLESS_BOOL]);
}