-Compiling clippy can take almost a minute or more depending on your machine.
-You can set the environment flag `CARGO_INCREMENTAL=1` to cut down that time to
-almost a third on average, depending on the influence your change has.
+First, create a new UI test file in the `tests/ui/` directory with the pattern you want to match:
+
+```rust
+// ./tests/ui/my_lint.rs
+
+// The custom_attribute needs to be enabled for the author lint to work
+#![feature(plugin, custom_attribute)]
+
+fn main() {
+ #[clippy(author)]
+ let arr: [i32; 1] = [7]; // Replace line with the code you want to match
+}
+```
+
+Now you run `TESTNAME=ui/my_lint cargo test --test compile-test` to produce
+a `.stdout` file with the generated code:
+
+```rust
+// ./tests/ui/my_lint.stdout
+
+if_chain! {
+ if let Expr_::ExprArray(ref elements) = stmt.node;
+ if elements.len() == 1;
+ if let Expr_::ExprLit(ref lit) = elements[0].node;
+ if let LitKind::Int(7, _) = lit.node;
+ then {
+ // report your lint here
+ }
+}
+```
+
+If the command was executed successfully, you can copy the code over to where you are implementing your lint.
+
+#### Documentation