reg.register_lint_pass(box misc::MiscPass as LintPassObject);
reg.register_lint_pass(box misc::StrToStringPass as LintPassObject);
reg.register_lint_pass(box misc::TopLevelRefPass as LintPassObject);
+ reg.register_lint_group("clippy", vec![types::CLIPPY_BOX_VEC, types::CLIPPY_DLIST,
+ misc::CLIPPY_SINGLE_MATCH, misc::CLIPPY_STR_TO_STRING,
+ misc::CLIPPY_TOPLEVEL_REF_ARG]);
}
pub struct MiscPass;
-declare_lint!(CLIPPY_SINGLE_MATCH, Warn,
+declare_lint!(pub CLIPPY_SINGLE_MATCH, Warn,
"Warn on usage of matches with a single nontrivial arm");
impl LintPass for MiscPass {
}
-declare_lint!(CLIPPY_STR_TO_STRING, Warn, "Warn when a String could use into_string() instead of to_string()");
+declare_lint!(pub CLIPPY_STR_TO_STRING, Warn, "Warn when a String could use into_string() instead of to_string()");
#[allow(missing_copy_implementations)]
pub struct StrToStringPass;
}
-declare_lint!(CLIPPY_TOPLEVEL_REF_ARG, Warn, "Warn about pattern matches with top-level `ref` bindings");
+declare_lint!(pub CLIPPY_TOPLEVEL_REF_ARG, Warn, "Warn about pattern matches with top-level `ref` bindings");
#[allow(missing_copy_implementations)]
pub struct TopLevelRefPass;
#[allow(missing_copy_implementations)]
pub struct TypePass;
-declare_lint!(CLIPPY_BOX_VEC, Warn,
+declare_lint!(pub CLIPPY_BOX_VEC, Warn,
"Warn on usage of Box<Vec<T>>");
-declare_lint!(CLIPPY_DLIST, Warn,
+declare_lint!(pub CLIPPY_DLIST, Warn,
"Warn on usage of DList");
/// Matches a type with a provided string, and returns its type parameters if successful