File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ because that's clearly a non-descriptive name.
1818 - [ Cargo lints] ( #cargo-lints )
1919 - [ Rustfix tests] ( #rustfix-tests )
2020 - [ Testing manually] ( #testing-manually )
21+ - [ Running directly] ( #running-directly )
2122 - [ Lint declaration] ( #lint-declaration )
2223 - [ Lint registration] ( #lint-registration )
2324 - [ Lint passes] ( #lint-passes )
@@ -186,6 +187,15 @@ cargo dev lint input.rs
186187from the working copy root. With tests in place, let's have a look at
187188implementing our lint now.
188189
190+ ## Running directly
191+
192+ While it's easier to just use ` cargo dev lint ` , it might be desirable to get
193+ ` target/release/cargo-clippy ` and ` target/release/clippy-driver ` to work as well in some cases.
194+ By default, they don't work because clippy dynamically links rustc. To help them find rustc,
195+ add the path printed by` rustc --print target-libdir ` (ran inside this workspace so that the rustc version matches)
196+ to your library search path.
197+ On linux, this can be done by setting the ` LD_LIBRARY_PATH ` environment variable to that path.
198+
189199## Lint declaration
190200
191201Let's start by opening the new file created in the ` clippy_lints ` crate at
You can’t perform that action at this time.
0 commit comments