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

Commit 90a87c8

Browse files
author
Hendrik van Antwerpen
committed
Limit ignored to explicitly skipped files
1 parent 8704616 commit 90a87c8

File tree

1 file changed

+9
-9
lines changed
  • tree-sitter-stack-graphs/src/cli

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ pub struct TestArgs {
8989
#[clap(long)]
9090
pub hide_failure_errors: bool,
9191

92-
/// Show ignored files in output.
92+
/// Show skipped files in output.
9393
#[clap(long)]
94-
pub show_ignored: bool,
94+
pub show_skipped: bool,
9595

9696
/// Save graph for tests matching output mode.
9797
/// Takes an optional path specification argument for the output file.
@@ -151,7 +151,7 @@ impl TestArgs {
151151
test_paths,
152152
hide_passing: false,
153153
hide_failure_errors: false,
154-
show_ignored: false,
154+
show_skipped: false,
155155
save_graph: None,
156156
save_paths: None,
157157
save_visualization: None,
@@ -208,15 +208,15 @@ impl TestArgs {
208208
) -> anyhow::Result<TestResult> {
209209
let cancellation_flag = &NoCancellation;
210210

211+
if self.show_skipped && test_path.extension().map_or(false, |e| e == "skip") {
212+
println!("{} {}", "⦵".dimmed(), test_path.display());
213+
return Ok(TestResult::new());
214+
}
215+
211216
let mut file_reader = FileReader::new();
212217
let lc = match loader.load_for_file(test_path, &mut file_reader, cancellation_flag)? {
213218
Some(sgl) => sgl,
214-
None => {
215-
if self.show_ignored {
216-
println!("{} {}", "⦵".dimmed(), test_path.display());
217-
}
218-
return Ok(TestResult::new());
219-
}
219+
None => return Ok(TestResult::new()),
220220
};
221221
let source = file_reader.get(test_path)?;
222222
let default_fragment_path = test_path.strip_prefix(test_root).unwrap();

0 commit comments

Comments
 (0)