pub struct Config {
pub docs: Vec<String>,
pub requirements: Vec<String>,
pub tests: Vec<String>,
pub diff_base: String,
pub judge: JudgeConfig,
pub rust: RustConfig,
pub exclude: Vec<String>,
pub index: Vec<String>,
pub site: Option<SiteConfig>,
}Fields§
§docs: Vec<String>§requirements: Vec<String>§tests: Vec<String>§diff_base: String§judge: JudgeConfig§rust: RustConfig§exclude: Vec<String>§index: Vec<String>Index roots (directories whose index.md lists the documents below).
site: Option<SiteConfig>Settings for miwa site.
Implementations§
Source§impl Config
impl Config
Sourcepub fn default_config() -> Config
pub fn default_config() -> Config
docs=[“docs”], requirements=[“req”], tests=[“.”], diff_base=“main”
pub fn to_yaml(&self) -> String
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
index rules: each entry must be non-empty after normalization, equal to
or under a docs / requirements entry, not contain an excluded
directory name (exclude or the default exclusions) as a segment, and no
two entries may be equal or nested in each other.
threshold must be finite and within 0..=1; each Vec must be
non-empty; diff_base must be non-empty; each rust.test_attributes
entry must be a non-empty [A-Za-z0-9_]+ string; each exclude entry must
be a bare directory name (no whitespace, separators, globs, ./..); and no
docs/requirements/tests entry may lie under an excluded directory
(exclude or the default exclusions).