lint: use eprintln for human-facing outputs

This commit is contained in:
Weihang Lo 2023-09-12 11:27:16 +08:00
parent f9d82a1703
commit 437942ee7e
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7
3 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ fn run() -> Result<(), Error> {
if same_file::is_same_file(source, &out_path).unwrap_or(false) {
bail!("cannot output to the same file as the source");
}
println!("Converting {} -> {}", source.display(), out_path.display());
eprintln!("Converting {} -> {}", source.display(), out_path.display());
let result = mdman::convert(&source, opts.format, opts.url.clone(), opts.man_map.clone())
.with_context(|| format!("failed to translate {}", source.display()))?;

View File

@ -163,7 +163,7 @@ pub fn resolve_with_config_raw(
if std::thread::panicking() && self.list.len() != self.used.len() {
// we found a case that causes a panic and did not use all of the input.
// lets print the part of the input that was used for minimization.
println!(
eprintln!(
"{:?}",
PrettyPrintRegistry(
self.list

View File

@ -20,7 +20,7 @@ use std::process::{Command, Output};
fn main() {
if let Err(e) = doit() {
println!("error: {}", e);
eprintln!("error: {}", e);
std::process::exit(1);
}
}
@ -103,7 +103,7 @@ fn doit() -> Result<(), Box<dyn Error>> {
result
};
let expect_success = parts[0][0].contains("MINOR");
println!("Running test from line {}", block_start);
eprintln!("Running test from line {}", block_start);
let result = run_test(
join(parts[1]),