RuleRegistry class

Registry for style rules.

Manages rule registration, lookup, and configuration. Provides access to all available rules and their enabled state.

Constructors

RuleRegistry()
Creates an empty registry.
RuleRegistry.withDefaults()
Creates a registry with default rules.
factory

Properties

allRules Iterable<StyleRule>
Gets all registered rules.
no setter
enabledRules Iterable<StyleRule>
Gets enabled rules.
no setter
hashCode int
The hash code for this object.
no setterinherited
ruleCount int
Gets the number of registered rules.
no setter
ruleIds Iterable<String>
Gets all rule IDs.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyConfig(Map<String, dynamic> config) → void
Applies configuration from a map.
clear() → void
Clears all rules and settings.
clearSettings() → void
Clears all settings (rules remain registered).
contains(String id) bool
Checks if a rule is registered.
disable(String ruleId) → void
Disables a rule.
enable(String ruleId) → void
Enables a rule.
get(String id) StyleRule?
Gets a rule by ID.
getExcludePatterns(String ruleId) List<String>
Gets exclude patterns for a rule.
getOptions(String ruleId) Map<String, dynamic>
Gets options for a rule.
getRulesByCategory(RuleCategory category) Iterable<StyleRule>
Gets rules by category.
getSettings(String ruleId) RuleSettings
Gets settings for a rule.
getSeverity(String ruleId) RuleSeverity
Gets the effective severity for a rule.
isEnabled(String ruleId) bool
Checks if a rule is enabled.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(StyleRule rule) → void
Registers a single rule.
registerAll(Iterable<StyleRule> rules) → void
Registers multiple rules.
registerBuiltInRules() → void
Registers all built-in rules.
setSettings(String ruleId, RuleSettings settings) → void
Sets settings for a rule.
setSeverity(String ruleId, RuleSeverity severity) → void
Sets severity override for a rule.
toString() String
Summary of registered rules for debugging.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited