corpora_core/config.rs
1//! Run configuration, threaded through every `Context`.
2
3use std::path::PathBuf;
4
5#[derive(Clone, Debug)]
6pub struct Config {
7 /// Corpus root the sources walk.
8 pub root: PathBuf,
9 pub report: ReportOptions,
10}
11
12impl Config {
13 pub fn new(root: impl Into<PathBuf>) -> Self {
14 Config {
15 root: root.into(),
16 report: ReportOptions::default(),
17 }
18 }
19}
20
21#[derive(Clone, Debug, Default)]
22pub struct ReportOptions {
23 /// `report --check`: render and byte-compare instead of writing.
24 pub check: bool,
25}