File tree 3 files changed +9
-5
lines changed
3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -147,10 +147,14 @@ add `// edition:2018` at the top of the test file (note that it's space-sensitiv
147
147
148
148
Manually testing against an example file can be useful if you have added some
149
149
` println! ` s and the test suite output becomes unreadable. To try Clippy with
150
- your local modifications, run `env CLIPPY_TESTS=true cargo run --bin
151
- clippy-driver -- -L ./target/debug input.rs` from the working copy root.
150
+ your local modifications, run
152
151
153
- With tests in place, let's have a look at implementing our lint now.
152
+ ```
153
+ env __CLIPPY_INTERNAL_TESTS=true cargo run --bin clippy-driver -- -L ./target/debug input.rs
154
+ ```
155
+
156
+ from the working copy root. With tests in place, let's have a look at
157
+ implementing our lint now.
154
158
155
159
## Lint declaration
156
160
Original file line number Diff line number Diff line change @@ -298,7 +298,7 @@ pub fn main() {
298
298
// - IF Clippy is run on the main crate, not on deps (`!cap_lints_allow`) THEN
299
299
// - IF `--no-deps` is not set (`!no_deps`) OR
300
300
// - IF `--no-deps` is set and Clippy is run on the specified primary package
301
- let clippy_tests_set = env:: var ( "CLIPPY_TESTS " ) . map_or ( false , |val| val == "true" ) ;
301
+ let clippy_tests_set = env:: var ( "__CLIPPY_INTERNAL_TESTS " ) . map_or ( false , |val| val == "true" ) ;
302
302
let cap_lints_allow = arg_value ( & orig_args, "--cap-lints" , |val| val == "allow" ) . is_some ( ) ;
303
303
let in_primary_package = env:: var ( "CARGO_PRIMARY_PACKAGE" ) . is_ok ( ) ;
304
304
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ fn run_ui_cargo(config: &mut compiletest::Config) {
254
254
255
255
fn prepare_env ( ) {
256
256
set_var ( "CLIPPY_DISABLE_DOCS_LINKS" , "true" ) ;
257
- set_var ( "CLIPPY_TESTS " , "true" ) ;
257
+ set_var ( "__CLIPPY_INTERNAL_TESTS " , "true" ) ;
258
258
//set_var("RUST_BACKTRACE", "0");
259
259
}
260
260
You can’t perform that action at this time.
0 commit comments