class
AmberLSP::Configuration
- AmberLSP::Configuration
- Reference
- Object
Defined in:
amber_lsp/configuration.crConstant Summary
-
CONFIG_FILE_NAME =
".amber-lsp.yml" -
DEFAULT_EXCLUDE_PATTERNS =
["lib/", "tmp/", "db/migrations/"]
Constructors
- .load(project_root : String) : Configuration
- .new(rule_configs : Hash(String, RuleConfig) = Hash(String, RuleConfig).new, exclude_patterns : Array(String) = DEFAULT_EXCLUDE_PATTERNS.dup, custom_rules : Array(CustomRuleConfig) = [] of CustomRuleConfig)
- .parse(yaml_content : String) : Configuration
Instance Method Summary
- #custom_rules : Array(CustomRuleConfig)
- #exclude_patterns : Array(String)
- #excluded?(file_path : String) : Bool
- #rule_enabled?(id : String) : Bool
- #rule_severity(id : String, default : Rules::Severity) : Rules::Severity
Constructor Detail
def self.new(rule_configs : Hash(String, RuleConfig) = Hash(String, RuleConfig).new, exclude_patterns : Array(String) = DEFAULT_EXCLUDE_PATTERNS.dup, custom_rules : Array(CustomRuleConfig) = [] of CustomRuleConfig)
#