]> git.lizzy.rs Git - rust.git/blobdiff - CONTRIBUTING.md
Fix deploy.sh III
[rust.git] / CONTRIBUTING.md
index 86a2f62411851df87e401c11575762311f8b40c4..5e74cd9ef0291d815341a149fb253e34a385d8c1 100644 (file)
@@ -28,13 +28,31 @@ how this syntax structure is encoded in the AST, it is recommended to run `rustc
 example of the structure and compare with the
 [nodes in the AST docs](http://manishearth.github.io/rust-internals-docs/syntax/ast/). Usually
 the lint will end up to be a nested series of matches and ifs,
-[like so](https://github.com/Manishearth/rust-clippy/blob/de5ccdfab68a5e37689f3c950ed1532ba9d652a0/src/misc.rs#L34)
+[like so](https://github.com/Manishearth/rust-clippy/blob/de5ccdfab68a5e37689f3c950ed1532ba9d652a0/src/misc.rs#L34).
 
 T-middle issues can be more involved and require verifying types. The
-[`middle::ty`](http://manishearth.github.io/rust-internals-docs/rustc/middle/ty) module contains a
+[`ty`](http://manishearth.github.io/rust-internals-docs/rustc/ty) module contains a
 lot of methods that are useful, though one of the most useful would be `expr_ty` (gives the type of
 an AST expression). `match_def_path()` in Clippy's `utils` module can also be useful.
 
+Should you add a lint, try it on clippy itself using `util/dogfood.sh`. You may find that clippy
+contains some questionable code itself! Also before making a pull request, please run
+`util/update_lints.py`, which will update `lib.rs` and `README.md` with the lint declarations. Our
+travis build actually checks for this.
+
+Also please document your lint with a doc comment akin to the following:
+```
+/// **What it does:** Describe what the lint matches.
+///
+/// **Why is this bad?** Write the reason for linting the code.
+///
+/// **Known problems:** Hopefully none.
+///
+/// **Example:** Insert a short example if you have one
+```
+
+Our `util/update_wiki.py` script can then add your lint docs to the wiki.
+
 ## Contributions
 
 Clippy welcomes contributions from everyone.
@@ -43,9 +61,11 @@ Contributions to Clippy should be made in the form of GitHub pull requests. Each
 be reviewed by a core contributor (someone with permission to land patches) and either landed in the
 main tree or given feedback for changes that would be required.
 
+All code in this repository is under the [Mozilla Public License, 2.0](https://www.mozilla.org/MPL/2.0/)
+
 ## Conduct
 
 We follow the [Rust Code of Conduct](http://www.rust-lang.org/conduct.html).
 
 
-<! -- adapted from https://github.com/servo/servo/blob/master/CONTRIBUTING.md -->
\ No newline at end of file
+<!-- adapted from https://github.com/servo/servo/blob/master/CONTRIBUTING.md -->