feat: add ignore flag for ignoring directories - #102
Conversation
ed6d1c5 to
03939b1
Compare
| @@ -103,6 +112,7 @@ pub fn start<B>( | |||
| terminal_backend: B, | |||
There was a problem hiding this comment.
Currently, the start function takes a growing list of parameters for various options and flags (e.g., show_apparent_size, disable_delete_confirmation). As we continue to add more options, this signature risks becoming unwieldy and harder to maintain. The challenge became especially apparent when updating the UI tests, which required significant changes due to the expanded parameter list.
To address this, I鈥檝e started a WIP implementation that uses the Opt struct as the last argument in start. This encapsulates all optional parameters into a single structure, aiming to reduce churn when adding or modifying options.
I鈥檇 appreciate input on the following:
- Is encapsulating options in a configuration struct like
Optan idiomatic approach in Rust? - Would a builder pattern provide better flexibility and maintainability for this use case?
- Are there other patterns or techniques in Rust that would align well with the goal of minimizing signature changes?
I鈥檓 especially interested in feedback on how this impacts code readability, maintainability, and idiomatic usage in Rust.
| folder: Option<PathBuf>, | ||
| #[structopt(short, long)] | ||
| /// The directories to ignore | ||
| ignore: Vec<PathBuf>, |
There was a problem hiding this comment.
I have opted to use an ignore option but wondering if we would prefer to use exclude with shorthand x, I have seen that preference voiced in other issues.
ignoreflag to optionally ignore directories from being scannedResolves #93