]> git.lizzy.rs Git - rust.git/blobdiff - CONTRIBUTING.md
travis: base-tests: share CARGO_TARGET_DIR between check runs of subcrates to avoid...
[rust.git] / CONTRIBUTING.md
index 26efa9a58c68abacee692736e4336bd9e4a86b39..bff456203db2f226f84e440dda377f8804a1f979 100644 (file)
@@ -22,6 +22,7 @@ All contributors are expected to follow the [Rust Code of Conduct](http://www.ru
   * [Linting Clippy with your local changes](#linting-clippy-with-your-local-changes)
   * [How Clippy works](#how-clippy-works)
   * [Fixing nightly build failures](#fixing-build-failures-caused-by-rust)
+* [Issue and PR Triage](#issue-and-pr-triage)
 * [Contributions](#contributions)
 
 ## Getting started
@@ -65,14 +66,15 @@ an AST expression). `match_def_path()` in Clippy's `utils` module can also be us
 
 ## Writing code
 
-Compiling Clippy from scratch can take almost a minute or more depending on your machine.
-However, since Rust 1.24.0 incremental compilation is enabled by default and compile times for small changes should be quick.
-
 [Llogiq's blog post on lints](https://llogiq.github.io/2015/06/04/workflows.html) is a nice primer
 to lint-writing, though it does get into advanced stuff. Most lints consist of an implementation of
 `LintPass` with one or more of its default methods overridden. See the existing lints for examples
 of this.
 
+If you want to add a new lint or change existing ones apart from bugfixing, it's
+also a good idea to give the [stability guaratees][rfc_stability] and
+[lint categories][rfc_lint_cats] sections of the [Clippy 1.0 RFC][clippy_rfc] a
+quick read.
 
 ### Author lint
 
@@ -129,7 +131,7 @@ Please document your lint with a doc comment akin to the following:
 /// ```
 ```
 
-Once your lint is merged it will show up in the [lint list](https://rust-lang-nursery.github.io/rust-clippy/master/index.html)
+Once your lint is merged it will show up in the [lint list](https://rust-lang.github.io/rust-clippy/master/index.html)
 
 ### Running test suite
 
@@ -166,18 +168,6 @@ Manually testing against an example file is useful if you have added some
 local modifications, run `env CLIPPY_TESTS=true cargo run --bin clippy-driver -- -L ./target/debug input.rs`
 from the working copy root.
 
-### Linting Clippy with your local changes
-
-Clippy CI only passes if all lints defined in the version of the Clippy being
-tested pass (that is, don’t report any suggestions). You can avoid prolonging
-the CI feedback cycle for PRs you submit by running these lints yourself ahead
-of time and addressing any issues found:
-
-```
-cargo build
-`pwd`/target/debug/cargo-clippy clippy --all-targets --all-features -- -D clippy::all -D clippy::internal -D clippy::pedantic
-```
-
 ### How Clippy works
 
 Clippy is a [rustc compiler plugin][compiler_plugin]. The main entry point is at [`src/lib.rs`][main_entry]. In there, the lint registration is delegated to the [`clippy_lints`][lint_crate] crate.
@@ -253,6 +243,20 @@ rustup override set master
 cargo test
 ```
 
+## Issue and PR triage
+
+Clippy is following the [Rust triage procedure][triage] for issues and pull
+requests.
+
+However, we are a smaller project with all contributors being volunteers
+currently. Between writing new lints, fixing issues, reviewing pull requests and
+responding to issues there may not always be enough time to stay on top of it
+all.
+
+Our highest priority is fixing [crashes][l-crash] and [bugs][l-bug]. We don't
+want Clippy to crash on your code and we want it to be as reliable as the
+suggestions from Rust compiler errors.
+
 ## Contributions
 
 Contributions to Clippy should be made in the form of GitHub pull requests. Each pull request will
@@ -278,3 +282,9 @@ or the [MIT](http://opensource.org/licenses/MIT) license.
 [toolstate_commit]: https://github.com/rust-lang-nursery/rust-toolstate/commit/6ce0459f6bfa7c528ae1886492a3e0b5ef0ee547
 [rtim]: https://github.com/kennytm/rustup-toolchain-install-master
 [rustup_component_history]: https://mexus.github.io/rustup-components-history
+[clippy_rfc]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md
+[rfc_stability]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#stability-guarantees
+[rfc_lint_cats]: https://github.com/rust-lang/rfcs/blob/master/text/2476-clippy-uno.md#lint-audit-and-categories
+[triage]: https://forge.rust-lang.org/triage-procedure.html
+[l-crash]: https://github.com/rust-lang/rust-clippy/labels/L-crash%20%3Aboom%3A
+[l-bug]: https://github.com/rust-lang/rust-clippy/labels/L-bug%20%3Abeetle%3A