summaryrefslogtreecommitdiff
path: root/tests/napi
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-08 22:45:06 -0400
committerGitHub <noreply@github.com>2024-05-08 22:45:06 -0400
commit47f7bed677a6b72e873712de8f3988ea891710e4 (patch)
tree096549459b479cf1383e65c87b77e9f9482df258 /tests/napi
parente6dc4dfbff25e77d2127591802229b4a74037d24 (diff)
chore: enable clippy::print_stdout and clippy::print_stderr (#23732)
1. Generally we should prefer to use the `log` crate. 2. I very often accidentally commit `eprintln`s. When we should use `println` or `eprintln`, it's not too bad to be a bit more verbose and ignore the lint rule.
Diffstat (limited to 'tests/napi')
-rw-r--r--tests/napi/src/lib.rs3
-rw-r--r--tests/napi/tests/napi_tests.rs7
2 files changed, 8 insertions, 2 deletions
diff --git a/tests/napi/src/lib.rs b/tests/napi/src/lib.rs
index 1b9246483..f6fe6e189 100644
--- a/tests/napi/src/lib.rs
+++ b/tests/napi/src/lib.rs
@@ -1,5 +1,8 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
#![allow(clippy::all)]
+#![allow(clippy::print_stdout)]
+#![allow(clippy::print_stderr)]
#![allow(clippy::undocumented_unsafe_blocks)]
use std::ffi::c_void;
diff --git a/tests/napi/tests/napi_tests.rs b/tests/napi/tests/napi_tests.rs
index 671699651..1c9b1ba94 100644
--- a/tests/napi/tests/napi_tests.rs
+++ b/tests/napi/tests/napi_tests.rs
@@ -1,5 +1,8 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+#![allow(clippy::print_stdout)]
+#![allow(clippy::print_stderr)]
+
use std::process::Command;
use test_util::deno_cmd;
use test_util::deno_config_path;
@@ -80,8 +83,8 @@ fn napi_tests() {
if !output.status.success() {
eprintln!("exit code {:?}", output.status.code());
- println!("stdout {stdout}");
- println!("stderr {stderr}");
+ println!("stdout {}", stdout);
+ println!("stderr {}", stderr);
}
assert!(output.status.success());
}