mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
Mention util/update_lints.py
This commit is contained in:
parent
5bfb306b4b
commit
36233789d4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user