QuestionRegisterConfig class

A project's conventions for its question index (<spec-root>/checks/question_register.yaml).

Constructors

QuestionRegisterConfig({required List<String> prefixes, required List<QuestionRegisterGroup> groups, required List<QuestionRegisterStatus> statuses})
Binds the id prefixes, the table's groups and the statuses.
const
QuestionRegisterConfig.parse(String yamlText)
Reads a configuration: prefixes (a list), groups (a list of {key, label, prefix, from?, to?}) and statuses (a list of {key, label, waiting?}); each missing key keeps its default.
factory

Properties

groups → List<QuestionRegisterGroup>
The count columns of the status table; empty for one per prefix.
final
hashCode → int
The hash code for this object.
no setterinherited
prefixes → List<String>
The id prefixes the check reads; empty for every upper-case prefix.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
statuses → List<QuestionRegisterStatus>
The statuses, in the table's order.
final

Methods

groupOf(String id) → String
The count column of id, given the prefixes the index uses.
isQuestionId(String id) → bool
Whether id is a question id of this register.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
rowId(String line) → String?
An index row's id at the start of line, or null.
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

defaults → const QuestionRegisterConfig
What a project without a configuration gets: every upper-case prefix, one column per prefix the index uses, and the statuses open (waiting), answered, obsolete and duplicate.