+// 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
+
+Please document your lint with a doc comment akin to the following:
+
+```rust
+/// **What it does:** Checks for ... (describe what the lint matches).
+///
+/// **Why is this bad?** Supply the reason for linting the code.
+///
+/// **Known problems:** None. (Or describe where it could go wrong.)
+///
+/// **Example:**
+///
+/// ```rust
+/// // Bad
+/// Insert a short example of code that triggers the lint
+///
+/// // Good
+/// Insert a short example of improved code that doesn't trigger the lint
+/// ```
+```
+
+Once your lint is merged it will show up in the [lint list](https://rust-lang-nursery.github.io/rust-clippy/master/index.html)
+
+### Running test suite
+
+Clippy uses UI tests. UI tests check that the output of the compiler is exactly as expected.
+Of course there's little sense in writing the output yourself or copying it around.
+Therefore you can simply run `tests/ui/update-all-references.sh` (after running
+`cargo test`) and check whether the output looks as you expect with `git diff`. Commit all
+`*.stderr` files, too.
+
+If you don't want to wait for all tests to finish, you can also execute a single test file by using `TESTNAME` to specify the test to run:
+
+```bash
+TESTNAME=ui/empty_line_after_outer_attr cargo test --test compile-test
+```
+
+### Testing manually
+
+Manually testing against an example file is useful if you have added some
+`println!`s and test suite output becomes unreadable. To try clippy with your
+local modifications, run `cargo run --bin clippy-driver -- -L ./target/debug input.rs` from the
+working copy root. Your test file, here `input.rs`, needs to have clippy
+enabled as a plugin:
+
+```rust
+#![feature(plugin)]
+#![plugin(clippy)]
+```
+
+## Contributions