From 35a730b4bf6816580f7bd1c2ba90777790aa0c83 Mon Sep 17 00:00:00 2001 From: Roland Schaer Date: Fri, 8 Mar 2024 11:32:56 -0300 Subject: [PATCH] feat(task): add option to show hidden tasks in dependency tree --- src/cli/tasks/deps.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/cli/tasks/deps.rs b/src/cli/tasks/deps.rs index 962c649a6..e5d39451b 100644 --- a/src/cli/tasks/deps.rs +++ b/src/cli/tasks/deps.rs @@ -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 @@ -19,6 +22,10 @@ pub struct TasksDeps { #[clap(verbatim_doc_comment)] pub tasks: Option>, + /// 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, @@ -49,7 +56,7 @@ impl TasksDeps { Ok(config .tasks()? .values() - .filter(|t| !t.hide) + .filter(|t| self.hidden || !t.hide) .cloned() .collect()) }