@@ -547,9 +547,9 @@ Before submitting your PR make sure you followed all of the basic requirements:
547547
548548## Adding configuration to a lint
549549
550- Clippy supports the configuration of lints values using a ` clippy.toml ` file in the workspace
550+ Clippy supports the configuration of lints values using a ` clippy.toml ` file in the workspace
551551directory. Adding a configuration to a lint can be useful for thresholds or to constrain some
552- behavior that can be seen as a false positive for some users. Adding a configuration is done
552+ behavior that can be seen as a false positive for some users. Adding a configuration is done
553553in the following steps:
554554
5555551 . Adding a new configuration entry to [ clippy_utils::conf] ( /clippy_utils/src/conf.rs )
@@ -558,10 +558,10 @@ in the following steps:
558558 /// Lint: LINT_NAME. <The configuration field doc comment>
559559 (configuration_ident , " configuration_value" : Type , DefaultValue ),
560560 ```
561- The configuration value and identifier should usually be the same . The doc comment will be
561+ The configuration value and identifier should usually be the same . The doc comment will be
562562 automatically added to the lint documentation .
5635632 . Adding the configuration value to the lint impl struct :
564- 1 . This first requires the definition of a lint impl struct . Lint impl structs are usually
564+ 1 . This first requires the definition of a lint impl struct . Lint impl structs are usually
565565 generated with the `declare_lint_pass! ` macro . This struct needs to be defined manually
566566 to add some kind of metadata to it :
567567 ```rust
@@ -578,7 +578,7 @@ in the following steps:
578578 LINT_NAME
579579 ]);
580580 ```
581-
581+
582582 2 . Next add the configuration value and a corresponding creation method like this :
583583 ```rust
584584 #[derive(Copy , Clone )]
@@ -598,7 +598,7 @@ in the following steps:
598598 ```
5995993 . Passing the configuration value to the lint impl struct :
600600
601- First find the struct construction in the [clippy_lints lib file ](/ clippy_lints / src / lib . rs).
601+ First find the struct construction in the [clippy_lints lib file ](/ clippy_lints / src / lib . rs).
602602 The configuration value is now cloned or copied into a local value that is then passed to the
603603 impl struct like this :
604604 ```rust
@@ -615,9 +615,9 @@ in the following steps:
615615
6166164 . Adding tests :
617617 1 . The default configured value can be tested like any normal lint in [`tests / ui `](/ tests / ui ).
618- 2 . The configuration itself will be tested separately in [`tests / ui - toml `](/ tests / ui - toml ).
619- Simply add a new subfolder with a fitting name . This folder contains a `clippy . toml` file
620- with the configuration value and a rust file that should be linted by Clippy . The test can
618+ 2 . The configuration itself will be tested separately in [`tests / ui - toml `](/ tests / ui - toml ).
619+ Simply add a new subfolder with a fitting name . This folder contains a `clippy . toml` file
620+ with the configuration value and a rust file that should be linted by Clippy . The test can
621621 otherwise be written as usual .
622622
623623## Cheatsheet
0 commit comments