Skip to content

Commit

Permalink
feat(task): add option to show hidden tasks in dependency tree
Browse files Browse the repository at this point in the history
  • Loading branch information
roele committed Mar 8, 2024
1 parent 0d95fde commit 35a730b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/cli/tasks/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ use petgraph::dot::Dot;
use crate::{
config::{Config, Settings},
task::{Deps, Task},
ui::{style, tree::print_tree},
ui::{
style::{self},
tree::print_tree,
},
};

/// [experimental] Display a tree visualization of a dependency graph
Expand All @@ -19,6 +22,10 @@ pub struct TasksDeps {
#[clap(verbatim_doc_comment)]
pub tasks: Option<Vec<String>>,

/// Show hidden tasks
#[clap(long, verbatim_doc_comment)]
pub hidden: bool,

/// Display dependencies in DOT format
#[clap(long, alias = "dot", verbatim_doc_comment)]
pub dot: bool,
Expand Down Expand Up @@ -49,7 +56,7 @@ impl TasksDeps {
Ok(config
.tasks()?
.values()
.filter(|t| !t.hide)
.filter(|t| self.hidden || !t.hide)
.cloned()
.collect())
}
Expand Down

0 comments on commit 35a730b

Please sign in to comment.