Mention util/update_lints.py

This commit is contained in:
Philipp Hansch 2018-04-24 21:04:43 +02:00
parent 5bfb306b4b
commit 36233789d4
No known key found for this signature in database
GPG Key ID: B6FA06A6E0E2665B
1 changed files with 1 additions and 0 deletions

View File

@ -175,6 +175,7 @@ pub fn register_plugins(reg: &mut rustc_plugin::Registry) {
The [`rustc_plugin::PluginRegistry`][plugin_registry] provides two methods to register lints: [register_early_lint_pass][reg_early_lint_pass] and [register_late_lint_pass][reg_late_lint_pass].
Both take an object that implements an [`EarlyLintPass`][early_lint_pass] or [`LateLintPass`][late_lint_pass] respectively. This is done in every single lint.
It's worth noting that the majority of `clippy_lints/src/lib.rs` is autogenerated by `util/update_lints.py` and you don't have to add anything by hand. When you are writing your own lint, you can use that script to save you some time.
```rust
// ./clippy_lints/src/else_if_without_else.rs