feat(lint): glossary rules for terms, equations, values, misconceptions

Fourteen rules in a new `glossary` family (src/authoring/lint/glossary.rs):
unused entries, renamed or coined terms with no textbook name, coined
terms with no exam wording, circular definitions, coined terms in items,
unsourced values, value variants in prose or items, policy-forbidden
target wording, explanation terms a target does not list, recall values
printed in items, deep targets on equations with no implications, and
unresolved {lo-}/{t-} references in 2.0 prose fields. Two of them are
notes: entries defined away from the objective that first needs them,
and the count of proposed entries.

Adds Severity::Note. `coursebank lint` prints notes by default and does
not fail on them, so a course with proposed entries still passes a lint
gate. A distractor that names a registry misconception counts as designed
and as having student feedback.

On the example the glossary rules report exactly glossary-unused on
val-per-decade and glossary-proposed for two entries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
alexmandClaude committed 2026-11-16 12:02:50 -05:00
1 parent 960cf6cbd3
commit b8fdf4d6a8
7 files changed
+1105 -7

No files matched your search

+5
View File
@@ -809,6 +809,10 @@ impl Gap {
/// How much attention a finding deserves.
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub enum Severity {
/// Information, not a problem: a count of entries waiting for approval, or
/// a convention that is reported but not enforced. `coursebank lint`
/// prints notes and does not fail on them.
Note,
/// Worth knowing.
Low,
/// Worth scheduling.
@@ -821,6 +825,7 @@ impl Severity {
/// A short label for report output.
pub fn label(self) -> &'static str {
match self {
Severity::Note => "note",
Severity::Low => "low",
Severity::Medium => "medium",
Severity::High => "high",