class ConventionConfig
- ConventionConfig
- Reference
- Object
Overview
Runtime config passed to convention rules. Loaded from
.lint_conventions.yml at the repo root (or defaults) by the runner.
Today only #view_subclass_approved_roots is configurable; future
rules can read additional fields without changing the constructor
signature.
Defined in:
lsp_rules/convention_rule.crConstant Summary
-
DEFAULT_VIEW_SUBCLASS_APPROVED_ROOTS =
["src/ui/views/", "samples/"]
Constructors
-
.load(path : String) : ConventionConfig
Loads config from a YAML file at
path, falling back to defaults for any missing key. - .new(view_subclass_approved_roots : Array(String) = DEFAULT_VIEW_SUBCLASS_APPROVED_ROOTS.dup)
Class Method Summary
-
.parse_yaml_string_list(text : String, dotted_key : String) : Array(String)
Tiny inline YAML parser sufficient for the keys we need (a flat
key:section with a nestedsubkey: [a, b]inline list OR a block list of- valuelines).
Instance Method Summary
- #view_subclass_approved_roots : Array(String)
- #view_subclass_approved_roots=(view_subclass_approved_roots : Array(String))
Constructor Detail
Loads config from a YAML file at path, falling back to defaults
for any missing key. Returns a fresh ConventionConfig with the
union of file values + defaults.
Class Method Detail
Tiny inline YAML parser sufficient for the keys we need (a flat
key: section with a nested subkey: [a, b] inline list OR a
block list of - value lines). Avoids pulling in the full YAML
shard at compile time — the runner is a single crystal run.