X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=CONTRIBUTING.md;h=8734242c6c016eac7e806205edf449b71951bf59;hb=f29ab8c2451e59153f956d01cb1f228663ef9054;hp=7d52e10f8673998c6e1a8d4145914fe48b54c5da;hpb=934ead14b566a80785ea1e647b2a3c5f747cf92e;p=rust.git diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7d52e10f867..8734242c6c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,7 +31,7 @@ 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). 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. @@ -41,17 +41,20 @@ contains some questionable code itself! Also before making a pull request, pleas 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. +```rust +/// **What it does:** Checks for ... (describe what the lint matches). /// -/// **Why is this bad?** Write the reason for linting the code. +/// **Why is this bad?** Supply the reason for linting the code. /// -/// **Known problems:** Hopefully none. +/// **Known problems:** None. (Or describe where it could go wrong.) /// -/// **Example:** Insert a short example if you have one +/// **Example:** +/// ```rust +/// Insert a short example if you have one. +/// ``` ``` -Our `util/update_wiki.py` script can then add your ilnt docs to the wiki. +Our `util/update_wiki.py` script can then add your lint docs to the wiki. ## Contributions