Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit c117a36

Browse files
author
Hendrik van Antwerpen
committed
Rename hide-failure-errors to hide-error-details and add it to analyze command
1 parent 37e8fc1 commit c117a36

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

tree-sitter-stack-graphs/src/cli/analyze.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ pub struct AnalyzeArgs {
5959
#[clap(long, short = 'v')]
6060
pub verbose: bool,
6161

62+
/// Hide failure error details.
63+
#[clap(long)]
64+
pub hide_error_details: bool,
65+
6266
/// Maximum runtime per file in seconds.
6367
#[clap(
6468
long,
@@ -78,6 +82,7 @@ impl AnalyzeArgs {
7882
source_paths,
7983
continue_from: None,
8084
verbose: false,
85+
hide_error_details: false,
8186
max_file_time: None,
8287
wait_at_start: false,
8388
}
@@ -203,7 +208,9 @@ impl AnalyzeArgs {
203208
Err(LoadError::ParseErrors(parse_errors)) => {
204209
let parse_error = map_parse_errors(source_path, &parse_errors, &source, "");
205210
file_status.error("parsing failed")?;
206-
eprintln!("{}", parse_error);
211+
if !self.hide_error_details {
212+
println!("{}", parse_error);
213+
}
207214
return Ok(());
208215
}
209216
Err(LoadError::Cancelled(_)) => {

tree-sitter-stack-graphs/src/cli/test.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ pub struct TestArgs {
9090

9191
/// Hide failure error details.
9292
#[clap(long)]
93-
pub hide_failure_errors: bool,
93+
pub hide_error_details: bool,
9494

9595
/// Show skipped files in output.
9696
#[clap(long)]
@@ -153,7 +153,7 @@ impl TestArgs {
153153
Self {
154154
test_paths,
155155
quiet: false,
156-
hide_failure_errors: false,
156+
hide_error_details: false,
157157
show_skipped: false,
158158
save_graph: None,
159159
save_paths: None,
@@ -336,7 +336,7 @@ impl TestArgs {
336336
result.count(),
337337
))?;
338338
}
339-
if !success && !self.hide_failure_errors {
339+
if !success && !self.hide_error_details {
340340
for failure in result.failures_iter() {
341341
println!("{}", failure);
342342
}

0 commit comments

Comments
 (0)