]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/utils/author.rs
Document the author lint
[rust.git] / clippy_lints / src / utils / author.rs
index 44e5e84c4a06342220419cf70b1279d399d37185..9d708d637c3c93db8f9b0db61f4169769ddb2a7e 100644 (file)
@@ -14,6 +14,7 @@
 ///
 /// **Example:**
 /// ```rust
+/// // ./tests/ui/my_lint.rs
 /// fn foo() {
 ///     // detect the following pattern
 ///     #[clippy(author)]
 /// }
 /// ```
 ///
-/// prints
+/// Running `TESTNAME=ui/my_lint cargo test --test compile-test` will produce
+/// a `./tests/ui/new_lint.stdout` file with the generated code:
 ///
-/// ```
+/// ```rust
+/// // ./tests/ui/new_lint.stdout
 /// if_chain!{
 ///     if let Expr_::ExprIf(ref cond, ref then, None) = item.node,
 ///     if let Expr_::ExprBinary(BinOp::Eq, ref left, ref right) = cond.node,
@@ -38,9 +41,9 @@
 ///     }
 /// }
 /// ```
-declare_lint! {
+declare_clippy_lint! {
     pub LINT_AUTHOR,
-    Warn,
+    internal_warn,
     "helper for writing lints"
 }