pub struct SourcedConfigFragment {
pub extends: Option<String>,
pub global: SourcedGlobalConfig,
pub per_file_ignores: SourcedValue<BTreeMap<String, Vec<String>>>,
pub per_file_flavor: SourcedValue<IndexMap<String, MarkdownFlavor>>,
pub code_block_tools: SourcedValue<CodeBlockToolsConfig>,
pub rules: BTreeMap<String, SourcedRuleConfig>,
pub rule_display_names: HashMap<String, String>,
pub unknown_keys: Vec<(String, String, Option<String>)>,
pub load_warnings: Vec<String>,
}Expand description
Represents configuration loaded from a single source file, with provenance. Used as an intermediate step before merging into the final SourcedConfig.
Fields§
§extends: Option<String>Path to a base config file to inherit from (consumed during loading, not a config setting)
global: SourcedGlobalConfig§per_file_ignores: SourcedValue<BTreeMap<String, Vec<String>>>§per_file_flavor: SourcedValue<IndexMap<String, MarkdownFlavor>>§code_block_tools: SourcedValue<CodeBlockToolsConfig>§rules: BTreeMap<String, SourcedRuleConfig>§rule_display_names: HashMap<String, String>Maps canonical rule IDs to their preferred display names (used by import). When importing from markdownlint configs, this preserves the user’s original naming preference (e.g., “line-length” instead of “MD013”).
unknown_keys: Vec<(String, String, Option<String>)>(section, key, display_name). The third element names the file for a
warning message and is already display-ready: relative to the working
directory for a config the user named, and for one reached through
extends the reference as written rather than the path it resolved to.
None for keys that came from the command line and belong to no file.
load_warnings: Vec<String>Problems found while parsing this file that the code acting on the value
can no longer report itself, because the value was withheld before it got
there. Merged into SourcedConfig::discovery_warnings, which is the
channel the withheld consumer’s own message went to.
Trait Implementations§
Source§impl Clone for SourcedConfigFragment
impl Clone for SourcedConfigFragment
Source§fn clone(&self) -> SourcedConfigFragment
fn clone(&self) -> SourcedConfigFragment
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more