Fix a failing check
Your pull request’s term check is red, and the annotation is on a page you may not have written. The check exists so that every term a page names has a definition, and no two entries claim one name. This page takes the annotation to a green local run. You don’t need to know how the termbase was built. You need the rule id and the value the message names.
Every transcript below is real output from the built tool and Vale 3.20.0.
The example repository has three term pages under docs/terms/ and one guide,
docs/guides/fitting.md, whose concepts: names them.
Decode the annotation
Section titled “Decode the annotation”This is what manni term check -f github leaves on a pull request:
::error file=docs/guides/fitting.md,line=3,title=manni%3Aterm/undefined-term::concepts: "corective lens" names no entry. Did you mean "corrective lens"? Correct the value, or run manni term fill to add the term.%0Amanni:term undefined-term: A page's concepts: names no entry, by label, id or alt-label.%0AGuide: https://hawkeyexl.github.io/manni/term/reference/rules/#undefined-term::notice file=docs/terms/corrective-lens.md,line=1,title=manni%3Aterm/unused-term::no page's concepts: names this term. Name it in the concepts: of a page that uses it.%0Amanni:term unused-term: No page's concepts: names the entry, or an entry in another language with its id.%0AGuide: https://hawkeyexl.github.io/manni/term/reference/rules/#unused-termThe first line is the one that failed the job. The pull request shows its
title as manni:term/undefined-term. The workflow command escapes the :,
which is why the raw line reads %3A.
| Part | In this annotation | What it tells you |
|---|---|---|
| Level | error | An error fails the job. A warning or a notice never does. |
| File and line | docs/guides/fitting.md, line 3 | The field that caused the finding. For a finding about a whole entry, the entry’s first line. |
| Rule | undefined-term | The row to read in the table. |
| Message | concepts: "corective lens" names no entry. Did you mean "corrective lens"? Correct the value, or run manni term fill to add the term. | The field and the value it could not resolve. The message ends with what to do, after Did you mean when a label is close. |
| Guidance | manni:term undefined-term: A page's concepts: names no entry, by label, id or alt-label. and Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#undefined-term | The two lines after %0A. The rule and when it fires, then a link to its section of the rules reference. |
Two families of rule reach a pull request. manni:term/<rule> comes from
manni term check, which reads the term records. manni:term/prose/<Style.Rule>
comes from manni term lint, which runs Vale over each definition. A third job,
manni term write -f vale --check, prints no annotation. It fails with a log
line naming a file.
Every rule at a glance
Section titled “Every rule at a glance”| Rule | It means | Do this |
|---|---|---|
undefined-term | A page’s concepts: names no entry. | Fix the spelling, or add the term. |
dangling-reference | A broader, narrower, related-terms or see value names no entry. | Fix the spelling, or add the term. |
label-collision | Two entries share a preferred label, ignoring case. | Rename one, or merge them. |
duplicate-id | Two entries share an id, ignoring case. | Rename one, or merge them. |
alt-label-collision | An alt-label is another entry’s preferred label. | Remove the alt-label, or merge the entries. |
label-overlap | An alt-label repeats the entry’s label, or a hidden-label is a name in use. | Remove the value, or move it to the field that matches its status. |
broader-cycle | A chain of broader returns to where it started, across the terms and every page’s graph: block. | Remove the value that closes it. |
see-not-empty | An entry with see also has a definition. | Remove the definition. |
missing-definition | An entry has neither a definition nor a see. | Write the definition. |
conflicting-matches | One IRI sits under two match fields of an entry. | Keep it under the one kind that holds. |
prose/<Style.Rule> | Vale flagged a definition, abstract or scope note. | Rewrite the sentence. |
--check failed | The committed Terms style no longer matches the set. | Run manni term write -f vale, and commit it. |
Twelve check rules never fail a run by default.
asymmetric-hierarchy,
asymmetric-related,
related-in-hierarchy,
alt-label-reference,
ambiguous-alt-label and
deprecated-label are warnings.
abstract-too-long, unused-term,
hierarchy-outside-termbase,
related-siblings,
orphan-term and
keyword-candidate
are notices. The
rules reference has each one’s level and
meaning, and a repository can move any level under term.severity.
A concepts value names no entry
Section titled “A concepts value names no entry”docs/guides/fitting.md:3 error manni:term/undefined-term concepts: "corective lens" names no entry. Did you mean "corrective lens"? Correct the value, or run manni term fill to add the term. manni:term undefined-term: A page's concepts: names no entry, by label, id or alt-label. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#undefined-termdocs/terms/corrective-lens.md:1 notice manni:term/unused-term no page's concepts: names this term. Name it in the concepts: of a page that uses it. manni:term unused-term: No page's concepts: names the entry, or an entry in another language with its id. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#unused-term
1 error, 1 notice in 3 termsconcepts: resolves against labels, then ids, then alt-labels. Nothing in the
set claims corective lens, so fix the spelling:
---title: Fitting lensesconcepts: [progressive lens, corective lens, bifocal]concepts: [progressive lens, corrective lens, bifocal]---✓ 3 terms, 3 references, no findingsThe unused-term notice went too, because a page now names corrective lens.
If the value is right and the term is new, add a term page for it. See
undefined-term.
A concepts value is an alt-label
Section titled “A concepts value is an alt-label”docs/guides/fitting.md:3 warning manni:term/alt-label-reference concepts: "PAL" is an alt-label of "progressive lens", so name the label. manni:term alt-label-reference: A page's concepts: names an entry by one of its alt-labels. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#alt-label-reference
1 warning in 3 termsA warning, so the run exits 0. PAL is a name the set knows, and the
message names the entry that claims it. Write that entry’s label instead:
---title: Fitting lensesconcepts: [PAL, corrective lens, bifocal]concepts: [progressive lens, corrective lens, bifocal]---See alt-label-reference.
A term points at nothing
Section titled “A term points at nothing”docs/terms/progressive-lens.md:8 error manni:term/dangling-reference related-terms: "bifocals" names no entry. Did you mean "bifocal"? Correct the value, or add the term it names. manni:term dangling-reference: A value of broader, narrower, related-terms or see names no entry, by label or by id. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#dangling-reference
1 error in 3 termsThe same mistake, inside a term. broader, narrower, related-terms and
see resolve against preferred labels and ids, ignoring case. The entry is
bifocal, so correct the value:
related-terms: [bifocals]related-terms: [bifocal]✓ 3 terms, 3 references, no findingsWhen the spelling is right and no entry exists, add the term instead. See
dangling-reference.
Two entries claim one name
Section titled “Two entries claim one name”A second glossary page, docs/glossary/bifocals.md, defines Bifocal again:
docs/terms/bifocal.md:4 error manni:term/label-collision "bifocal" is claimed by docs/glossary/bifocals.md:1 as "Bifocal". Rename one label, or merge the two entries. manni:term label-collision: Two entries claim the same preferred label, ignoring case. Across languages, only when the spellings differ. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#label-collision
1 error in 4 termsLabels are compared ignoring case, so Bifocal and bifocal are one name.
When both pages also carry id: bifocal, the run adds a duplicate-id on
each:
docs/glossary/bifocals.md:1 error manni:term/duplicate-id id: "bifocal" is also used by docs/terms/bifocal.md:1. Give one entry its own id, or merge the two. manni:term duplicate-id: Two entries in one language share an id, ignoring case. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#duplicate-iddocs/terms/bifocal.md:1 error manni:term/duplicate-id id: "bifocal" is also used by docs/glossary/bifocals.md:1. Give one entry its own id, or merge the two. manni:term duplicate-id: Two entries in one language share an id, ignoring case. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#duplicate-iddocs/terms/bifocal.md:4 error manni:term/label-collision "bifocal" is claimed by docs/glossary/bifocals.md:1 as "Bifocal". Rename one label, or merge the two entries. manni:term label-collision: Two entries claim the same preferred label, ignoring case. Across languages, only when the spellings differ. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#label-collision
3 errors in 4 termsDecide whether the two pages define one thing or two.
-
One thing. Merge them. Keep one page, move anything worth keeping into it, and delete the other. With
docs/glossary/bifocals.mdgone:✓ 3 terms, 3 references, no findings -
Two things. Rename one. Give it a label and an id of its own, such as
bifocal spectaclesandbifocals. A term no page names yet is a notice, and the run exits0:docs/glossary/bifocals.md:1notice manni:term/unused-term no page's concepts: names this term.Name it in the concepts: of a page that uses it.manni:term unused-term: No page's concepts: names the entry, or an entry in another language with its id.Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#unused-term1 notice in 4 terms
An id you never wrote can collide too. An entry without one takes its
construct’s own identifier, else the slug of its label. See how an entry gets
its id.
alt-label-collision is the same problem between an alt-label and a preferred
label: remove the alt-label, or merge the entries.
See label-collision,
duplicate-id and
alt-label-collision.
A hierarchy loops
Section titled “A hierarchy loops”docs/terms/corrective-lens.md:6 error manni:term/broader-cycle broader: corrective lens > progressive lens > corrective lens. Remove the broader value that closes the loop. manni:term broader-cycle: A chain of broader returns to where it started, across the terms and every page's graph: block. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#broader-cycledocs/terms/progressive-lens.md:1 warning manni:term/asymmetric-hierarchy narrower: omits "corrective lens", which lists this entry as broader. Add it to narrower, or remove this entry from its broader. manni:term asymmetric-hierarchy: A names B as broader, and B omits A from narrower, or the reverse. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#asymmetric-hierarchy
1 error, 1 warning in 3 termsThe message spells the chain. progressive lens is narrower than
corrective lens, and line 6 says the reverse as well. Remove the broader
value that closes the loop:
---type: termid: corrective-lenslabel: corrective lensnarrower: [progressive lens]broader: [progressive lens]definition: A lens worn to correct a refractive error of the eye.---✓ 3 terms, 3 references, no findingsThe warning goes with it, because it came from the same line. See
broader-cycle.
A redirect carries a definition
Section titled “A redirect carries a definition”docs/terms/varifocal.md:1 notice manni:term/unused-term no page's concepts: names this term. Name it in the concepts: of a page that uses it. manni:term unused-term: No page's concepts: names the entry, or an entry in another language with its id. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#unused-termdocs/terms/varifocal.md:5 error manni:term/see-not-empty see: "progressive lens" redirects this entry, so remove its definition manni:term see-not-empty: An entry with see also carries a definition. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#see-not-empty
1 error, 1 notice in 4 termsAn entry with see sends the reader to the entry that defines the term, so it
defines nothing itself. Delete its definition:
---type: termid: varifocallabel: varifocalsee: progressive lensdefinition: Another name for a progressive lens.---docs/terms/varifocal.md:1 notice manni:term/unused-term no page's concepts: names this term. Name it in the concepts: of a page that uses it. manni:term unused-term: No page's concepts: names the entry, or an entry in another language with its id. Guide: https://hawkeyexl.github.io/manni/term/reference/rules/#unused-term
1 notice in 4 termsThe notice stays, and the run exits 0. If the entry should be a term of its
own, remove see and keep the definition instead. See
see-not-empty.
A definition breaks the house voice
Section titled “A definition breaks the house voice”A manni:term/prose/… annotation comes from manni term lint. The part after
prose/ is a Vale rule from your repository’s own styles:
::error file=docs/terms/corrective-lens.md,line=6,title=manni%3Aterm/prose/House.Length::Keep a sentence under 20 words.%0Avale House.Length::warning file=docs/terms/corrective-lens.md,line=6,title=manni%3Aterm/prose/House.Simply::Drop 'simply'.%0Avale House.SimplyThe line after %0A names the Vale rule. When the rule’s style gives a
description or a link, the annotation carries them too.
Line 6 is the definition:
definition: A lens that is simply worn in front of the eye, or on it, to correct a refractive error such as myopia, hyperopia, astigmatism or presbyopia.Rewrite it until the rule passes:
definition: A lens worn to correct a refractive error, such as myopia or presbyopia.✓ 3 terms, no findingsA House.Length finding on a definition that is one long noun phrase may be
the rule’s fault, not the sentence’s. That is a question for whoever owns the
Vale configuration. Keep the terms and the docs in step
shows the section that relaxes a rule for definitions alone.
The Vale style is out of date
Section titled “The Vale style is out of date”The vale job fails with a line naming a file, and no annotation:
$ manni term write -f vale --check.vale/styles/Terms/Deprecated.yml would change$ echo $?1The Terms style is generated from the term set, and a term changed without
regenerating it. Here a hidden-label was added to progressive lens.
Regenerate the style:
$ manni term write -f valeWrote 3 terms to .vale/styles/Terms Lowercase.yml 3 labels Deprecated.yml 2 swaps PAL.yml 1 acronym$ manni term write -f vale --check.vale/styles/Terms is up to dateCommit the changed files under Terms/ beside the term page. Don’t edit them
by hand. Each opens with a line saying it is generated, and the next render
replaces it.
Reproduce and confirm locally
Section titled “Reproduce and confirm locally”Don’t guess and re-push. Run the job that failed, on your machine.
-
Run it from the repository root. No install needed:
Terminal window npx @hawkeyexl/manni term checkWith no path, the run reads every collection
manni.config.yamldeclares. Those are the files CI reads. Swap interm lintorterm write -f vale --checkfor the other two jobs. -
Make the edit from the matching section above.
-
Run it again and confirm the green line. The counts are your repository’s:
✓ 3 terms, 3 references, no findings -
Push. Commit the page, and after
write -f valethe style too.
What the exit code means
Section titled “What the exit code means”| Code | Meaning |
|---|---|
0 | No error-severity finding, or --check found the style up to date. The job is green. |
1 | At least one error-severity finding the baseline does not hold, or --check found a file that differs. This is the red check you came here to fix. |
2 | The job could not run. No terms, no Vale on PATH, a bad flag or a bad config key. The message is on stderr, prefixed manni:. |
A 1 means fix the page. A 2 means fix the setup, or ask whoever configured
the check.