Documentation
¶
Overview ¶
Package course reads a course of the module format and checks it as the format says: the file by the YAML rules, the format version it names, its schema and the rule of its grades. A course joins modules, one for each school grade, into one line of learning; it is no part of a module, and the module index holds its value. The CLI's check-course and index call it.
Index ¶
Constants ¶
const RuleGrades = "course.grades"
RuleGrades is the rule of a course that its schema cannot say: its grades stand in ascending order, no grade twice, and no module stands at two grades.
Variables ¶
var Rules = []string{RuleGrades}
Rules lists the rules of a course, in the order the format lists them.
Functions ¶
func Breaches ¶
Breaches gives what a course that its schema accepts breaks of course.grades: the first grade that does not stand above the one before it, or the first module that stands at a grade already.
func Check ¶
Check reads a course file and checks it by the format version module-kit reads: by the YAML rules, by the format version it names, against course.schema.json and by course.grades. A course that names a version module-kit does not read breaks manifest.format-version alone, as a manifest does, since the rest of it is written by rules module-kit does not know. Its breaches have no path, as those of module.CheckFile; the caller names the file. The error is for a file that the reader of YAML cannot read, though the format may accept it.
func Read ¶
Read is Check, and gives besides the course when the report has no breach: the value of its file as it is, with no default filled in, as the module index holds it. The breaches stand in the order of their places — the line and column, then the value, member by member —, and at one place in the order of their rules, keywords and messages, so that the report is the same on every run.
Types ¶
This section is empty.