class

AmebaConfig::Rule

Inherits Reference < Object

Describes a single ameba rule discovered via the ameba CLI.

default_settings mirrors the order ameba prints in its YAML configuration example so generated output stays deterministic. The Enabled key is injected from the rule listing's enabled-by-default flag because the example always shows Enabled: true regardless of the actual default.

Constructors

new(name : String, severity : Severity, enabled_by_default : Bool, short_description : String, detailed_description : String, default_settings : Array(Tuple(String, YAML::Any)))
Source

Instance methods

default_for(setting : String) : YAML::Any | Nil

Returns the default value for a single setting, or nil if the rule does not declare such a setting.

Source
default_settings
Source
defaults_hash

Returns the complete defaults hash, used when materializing all settings for a rule that is being kept in the generated config.

Source
detailed_description
Source
enabled_by_default?
Source
group
Source
has_setting?(setting : String) : Bool

Returns true if setting is a known setting for this rule.

Source
name
Source
setting_names

Returns the ordered list of setting names declared for this rule.

Source
severity
Source
short_description
Source
short_name
Source