diff --git a/src/config.rs b/src/config.rs index aea2b8c1..4532dd91 100644 --- a/src/config.rs +++ b/src/config.rs @@ -143,6 +143,10 @@ pub struct CommandLineArgs { #[structopt(long = "disable", possible_values = &Step::variants())] disable: Vec, + /// Perform only the specified steps (experimental) + #[structopt(long = "only", possible_values = &Step::variants())] + only: Vec, + /// Output logs #[structopt(short = "v", long = "verbose")] verbose: bool, @@ -208,6 +212,10 @@ impl Config { /// If the step appears either in the `--disable` command line argument /// or the `disable` option in the configuration, the function returns false. pub fn should_run(&self, step: Step) -> bool { + if !self.opt.only.is_empty() { + return self.opt.only.contains(&step); + } + !(self .config_file .disable