pub fn validate_inline_enables_against_active_rules(
content: &str,
flavor: MarkdownFlavor,
active_rules: &HashSet<String>,
ignored_for_file: &HashSet<String>,
) -> Vec<InlineConfigWarning>Expand description
Warn when an inline directive tries to ENABLE a rule that will not run over this document, so the enable has no effect.
rumdl removes disabled rules from the rule set before any file is read
(filter_rules), so a disabled rule is never instantiated and inline config
cannot bring it back. per-file-ignores removes further rules for the file
at hand, with the same finality. active_rules is the set of canonical rule
ids configuration left enabled and ignored_for_file the ids
per-file-ignores then takes away; a valid rule outside the first, or inside
the second, is not running.
Only recognized rule names warn. Unknown names are left to
validate_inline_config_rules, a bare enable/enable-file (no rules,
meaning “all”) targets no specific rule, a configure-file boolean warns
only for true (an enable), never false (a disable), and a directive
inside a code block enables nothing to begin with.