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

Commit 2db4685

Browse files
author
Hendrik van Antwerpen
committed
Rename --hide-passing to more common --quiet
1 parent 80ee87b commit 2db4685

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

tree-sitter-stack-graphs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323

2424
- A new `analyze` command that computes stack graphs and partial paths for all given source files and directories. The command does not produce any output at the moment. Analysis per file can be limited using the `--max-file-time` flag.
2525

26+
#### Changed
27+
28+
- The `--show-ignored` flag of the `test` command has been renamed to `--show-skipped`. Only explicitly skipped test files (with a `.skip` extension) will be shown. Other unsupported files are, such as generated HTML files, are never shown.
29+
- The output of the `test` command has changed to print the test name before the test result, so that it clear which test is currently running.
30+
- The `--hide-passing` flag of the `test` command has been renamed to the more common `--quiet`/`-q`.
31+
2632
## v0.6.0 -- 2023-01-13
2733

2834
### Library

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ pub struct TestArgs {
8181
)]
8282
pub test_paths: Vec<PathBuf>,
8383

84-
/// Hide passing tests.
85-
#[clap(long)]
86-
pub hide_passing: bool,
84+
/// Hide passing tests in output.
85+
#[clap(long, short = 'q')]
86+
pub quiet: bool,
8787

8888
/// Hide failure error details.
8989
#[clap(long)]
@@ -149,7 +149,7 @@ impl TestArgs {
149149
pub fn new(test_paths: Vec<PathBuf>) -> Self {
150150
Self {
151151
test_paths,
152-
hide_passing: false,
152+
quiet: false,
153153
hide_failure_errors: false,
154154
show_skipped: false,
155155
save_graph: None,
@@ -220,7 +220,7 @@ impl TestArgs {
220220
};
221221
let source = file_reader.get(test_path)?;
222222

223-
if !self.hide_passing {
223+
if !self.quiet {
224224
print!("{}: ", test_path.display());
225225
}
226226

@@ -317,11 +317,11 @@ impl TestArgs {
317317
fn handle_result(&self, test_path: &Path, result: &TestResult) -> anyhow::Result<bool> {
318318
let success = result.failure_count() == 0;
319319
if success {
320-
if !self.hide_passing {
320+
if !self.quiet {
321321
println!("{}", "success".green());
322322
}
323323
} else {
324-
if self.hide_passing {
324+
if self.quiet {
325325
print!("{}: ", test_path.display());
326326
}
327327
println!(
@@ -357,7 +357,7 @@ impl TestArgs {
357357
.map(|spec| spec.format(test_root, test_path))
358358
{
359359
self.save_graph(&path, &graph, filter)?;
360-
if !success || !self.hide_passing {
360+
if !success || !self.quiet {
361361
println!("{}: graph at {}", test_path.display(), path.display());
362362
}
363363
}
@@ -367,7 +367,7 @@ impl TestArgs {
367367
.map(|spec| spec.format(test_root, test_path))
368368
{
369369
self.save_paths(&path, paths, graph, filter)?;
370-
if !success || !self.hide_passing {
370+
if !success || !self.quiet {
371371
println!("{}: paths at {}", test_path.display(), path.display());
372372
}
373373
}
@@ -377,7 +377,7 @@ impl TestArgs {
377377
.map(|spec| spec.format(test_root, test_path))
378378
{
379379
self.save_visualization(&path, paths, graph, filter, &test_path)?;
380-
if !success || !self.hide_passing {
380+
if !success || !self.quiet {
381381
println!(
382382
"{}: visualization at {}",
383383
test_path.display(),

0 commit comments

Comments
 (0)