Skip to main content

validate_inline_enables_against_active_rules

Function validate_inline_enables_against_active_rules 

Source
pub fn validate_inline_enables_against_active_rules(
    content: &str,
    active_rules: &HashSet<String>,
) -> Vec<InlineConfigWarning>
Expand description

Warn when an inline directive tries to ENABLE a rule that configuration left disabled, 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. active_rules is the set of canonical rule ids that configuration left enabled; a valid rule outside it is not running.

Only recognized rule names outside the active set warn. Unknown names are left to validate_inline_config_rules, a bare enable/enable-file (no rules, meaning “all”) targets no specific rule, and a configure-file boolean warns only for true (an enable), never false (a disable).