RuleConfig class
Configuration for style rules.
Parses YAML configuration and provides rule settings.
Constructors
-
RuleConfig({List<
String> excludePatterns = const [], Map<String, RuleSettings> ruleSettings = const {}, MetricsThresholds metrics = const MetricsThresholds()}) -
const
- RuleConfig.defaults()
-
Creates default configuration.
factory
-
RuleConfig.fromMap(Map<
String, dynamic> map) -
Parses configuration from a Map.
factory
- RuleConfig.fromYaml(String yamlContent)
-
Parses configuration from YAML content.
factory
Properties
-
excludePatterns
→ List<
String> -
Global file patterns to exclude from all rules.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- metrics → MetricsThresholds
-
Metrics thresholds for rule integration.
final
-
ruleSettings
→ Map<
String, RuleSettings> -
Rule-specific settings.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
applyTo(
RuleRegistry registry) → void - Applies this configuration to a rule registry.
-
getExcludePatterns(
String ruleId) → List< String> - Gets exclude patterns for a rule.
-
getOptions(
String ruleId) → Map< String, dynamic> - Gets options for a rule.
-
getSettings(
String ruleId) → RuleSettings - Gets settings for a rule.
-
isEnabled(
String ruleId) → bool - Checks if a rule is enabled in configuration.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
loadFromDirectory(
String directory) → Future< RuleConfig> - Loads configuration from analysis_options.yaml in a directory.
-
loadFromFile(
String path) → Future< RuleConfig> - Loads configuration from a file.