This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -581,15 +581,15 @@ in the following steps:
581
581
3 . Passing the configuration value to the lint impl struct :
582
582
583
583
First find the struct construction in the [clippy_lints lib file ](/ clippy_lints / src / lib . rs).
584
- Make sure that ` clippy dev update_lints ` added it beforehand . The configuration value is now
585
- cloned or copied into a local value that is then passed to the impl struct like this :
584
+ The configuration value is now cloned or copied into a local value that is then passed to the
585
+ impl struct like this :
586
586
```rust
587
587
// Default generated registration:
588
- store . register_late_pass (|| box module :: StructName );
588
+ store . register_ * _pass (|| box module :: StructName );
589
589
590
590
// New registration with configuration value
591
591
let configuration_ident = conf . configuration_ident. clone ();
592
- store . register_late_pass (move || box module :: StructName :: new (configuration_ident ));
592
+ store . register_ * _pass (move || box module :: StructName :: new (configuration_ident ));
593
593
```
594
594
595
595
Congratulations the work is almost done . The configuration value can now be accessed
@@ -599,7 +599,7 @@ in the following steps:
599
599
1 . The default configured value can be tested like any normal lint in [`tests / ui `](/ tests / ui ).
600
600
2 . The configuration itself will be tested separately in [`tests / ui - toml `](/ tests / ui - toml ).
601
601
Simply add a new subfolder with a fitting name . This folder contains a `clippy . toml` file
602
- with the configuration value and a rust file that should be linted by clippy . The test can
602
+ with the configuration value and a rust file that should be linted by Clippy . The test can
603
603
otherwise be written as usual .
604
604
605
605
## Cheatsheet
Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ See <https://rustc-dev-guide.rust-lang.org/contributing.html#opening-a-pr>.
109
109
| HIR | High-Level Intermediate Representation |
110
110
| TCX | Type context |
111
111
112
- This is a concise list of abbreviations that can come up during clippy development. An extensive
112
+ This is a concise list of abbreviations that can come up during Clippy development. An extensive
113
113
general list can be found in the [ rustc-dev-guide glossary] [ glossary ] . Always feel free to ask if
114
114
an abbreviation or meaning is unclear to you.
115
115
You can’t perform that action at this time.
0 commit comments