extern crate rustc;
use rustc::lint::{LintArray, LintPass};
-#[macro_use]
-extern crate clippy_lints;
-
-declare_clippy_lint! {
- pub TEST_LINT,
- correctness,
- ""
+declare_tool_lint! {
+ pub clippy::TEST_LINT,
+ Warn,
+ "",
+ report_in_external_macro: true
}
-declare_clippy_lint! {
- pub TEST_LINT_REGISTERED,
- correctness,
- ""
+declare_tool_lint! {
+ pub clippy::TEST_LINT_REGISTERED,
+ Warn,
+ "",
+ report_in_external_macro: true
}
-declare_clippy_lint! {
- pub TEST_LINT_REGISTERED_ONLY_IMPL,
- correctness,
- ""
+declare_tool_lint! {
+ pub clippy::TEST_LINT_REGISTERED_ONLY_IMPL,
+ Warn,
+ "",
+ report_in_external_macro: true
}
pub struct Pass;
error: the lint `TEST_LINT` is not added to any `LintPass`
- --> $DIR/lint_without_lint_pass.rs:11:1
+ --> $DIR/lint_without_lint_pass.rs:8:1
|
-LL | / declare_clippy_lint! {
-LL | | pub TEST_LINT,
-LL | | correctness,
-LL | | ""
+LL | / declare_tool_lint! {
+LL | | pub clippy::TEST_LINT,
+LL | | Warn,
+LL | | "",
+LL | | report_in_external_macro: true
LL | | }
| |_^
|