@@ -13,7 +13,6 @@ because that's clearly a non-descriptive name.
1313 - [ Testing] ( #testing )
1414 - [ Cargo lints] ( #cargo-lints )
1515 - [ Rustfix tests] ( #rustfix-tests )
16- - [ Edition 2018 tests] ( #edition-2018-tests )
1716 - [ Testing manually] ( #testing-manually )
1817 - [ Lint declaration] ( #lint-declaration )
1918 - [ Lint registration] ( #lint-registration )
@@ -402,9 +401,8 @@ need to ensure that the MSRV configured for the project is >= the MSRV of the
402401required Rust feature. If multiple features are required, just use the one with
403402a lower MSRV.
404403
405- First, add an MSRV alias for the required feature in
406- [ ` clippy_utils::msrvs ` ] ( /clippy_utils/src/msrvs.rs ) . This can be accessed later
407- as ` msrvs::STR_STRIP_PREFIX ` , for example.
404+ First, add an MSRV alias for the required feature in [ ` clippy_utils::msrvs ` ] .
405+ This can be accessed later as ` msrvs::STR_STRIP_PREFIX ` , for example.
408406
409407``` rust
410408msrv_aliases! {
@@ -468,6 +466,8 @@ define_Conf! {
468466}
469467```
470468
469+ [ `clippy_utils::msrvs` ] : https://doc.rust-lang.org/nightly/nightly-rustc/clippy_utils/msrvs/index.html
470+
471471## Author lint
472472
473473If you have trouble implementing your lint, there is also the internal ` author `
@@ -583,8 +583,7 @@ the workspace directory. Adding a configuration to a lint can be useful for
583583thresholds or to constrain some behavior that can be seen as a false positive
584584for some users. Adding a configuration is done in the following steps:
585585
586- 1 . Adding a new configuration entry to
587- [ clippy_lints::utils::conf] ( /clippy_lints/src/utils/conf.rs ) like this:
586+ 1 . Adding a new configuration entry to [ ` clippy_lints::utils::conf ` ] like this:
588587
589588 ``` rust
590589 /// Lint: LINT_NAME.
@@ -635,9 +634,9 @@ for some users. Adding a configuration is done in the following steps:
635634 ```
6366353 . Passing the configuration value to the lint impl struct :
637636
638- First find the struct construction in the [clippy_lints lib
639- file ]( / clippy_lints / src / lib . rs) . The configuration value is now cloned or
640- copied into a local value that is then passed to the impl struct like this :
637+ First find the struct construction in the [` clippy_lints ` lib file ] . The
638+ configuration value is now cloned or copied into a local value that is then
639+ passed to the impl struct like this :
641640
642641 ```rust
643642 // Default generated registration:
@@ -653,12 +652,16 @@ for some users. Adding a configuration is done in the following steps:
653652
6546534 . Adding tests:
655654 1 . The default configured value can be tested like any normal lint in
656- [ ` tests/ui ` ] ( /tests/ui ) .
657- 2 . The configuration itself will be tested separately in
658- [ ` tests/ui-toml ` ] ( /tests/ui-toml ) . Simply add a new subfolder with a
659- fitting name. This folder contains a ` clippy.toml ` file with the
660- configuration value and a rust file that should be linted by Clippy. The
661- test can otherwise be written as usual.
655+ [ ` tests/ui ` ] .
656+ 2 . The configuration itself will be tested separately in [ ` tests/ui-toml ` ] .
657+ Simply add a new subfolder with a fitting name. This folder contains a
658+ ` clippy.toml ` file with the configuration value and a rust file that
659+ should be linted by Clippy. The test can otherwise be written as usual.
660+
661+ [ `clippy_lints::utils::conf` ] : https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/utils/conf.rs
662+ [ `clippy_lints` lib file ] : https://github.com/rust-lang/rust-clippy/blob/master/clippy_lints/src/lib.rs
663+ [ `tests/ui` ] : https://github.com/rust-lang/rust-clippy/blob/master/tests/ui
664+ [ `tests/ui-toml` ] : https://github.com/rust-lang/rust-clippy/blob/master/tests/ui-toml
662665
663666## Cheat Sheet
664667
0 commit comments