IF Commons GitHub

governance/vocabulary

Written to: 2 requirements: 2 proved, 0 partly, 0 failing, 0 with no test recorded. 0003-governance FR-009, 0003-governance FR-008

A vocabulary (commons data 0003-governance FR-008): the annotation kinds a part of governance speaks in, and the lint rules that say where a domain falls short of them. The engine's contribution point governance.vocabulary lets an extension add one; vocabulariesFrom reads those of a composition in its order. A finding is data: the rule, the element, a sentence and a severity.

Source: commons/data/governance/vocabulary.ts

4 of 8 exports are imported by a test of the run. A test that imports an export may not call it or check what it returns.

Findinginterfaceno test imports it
interface Finding

What lint says of one element.

MemberTypeWhat it is
rulestringThe rule that found it, <vocabulary>/<name>.
elementElementId
messagestringOne plain sentence.
severitySeverity
findingconst
const finding: (rule: string, element: ElementId, message: string, severity?: Severity) => Finding

A finding, made.

Imported by 4 tests of the run (4 passed, 0 failed): the library's results

LintRuleinterfaceno test imports it
interface LintRule

A lint rule: what it looks for, and how it looks.

MemberTypeWhat it is
idstring<vocabulary>/<name>.
describestringWhat it looks for, in a sentence.
check(domain: Domain) => readonly Finding[]
Severitytypeno test imports it
type Severity = "error" | "warning";

How serious a finding is: an error is a fault in the domain, a warning is a gap.

Vocabularyinterface
interface Vocabulary

A vocabulary: annotation kinds and the rules that hold a domain to them.

MemberTypeWhat it is
idstring
kindsreadonly AnnotationKind<unknown>[]
rulesreadonly LintRule[]

Imported by 13 tests of the run (13 passed, 0 failed): the library's results

vocabulariesFromfunction
function vocabulariesFrom(composition: Composition): readonly Vocabulary[]

The vocabularies of a composition, in its order.

ParameterWhat it is
compositionthe project's composition

Returns: the vocabularies its extensions contribute

Imported by 4 tests of the run (4 passed, 0 failed): the library's results

vocabularyExtensionfunction
function vocabularyExtension(v: Vocabulary, version?: string): Result<Extension, IdError>

An extension that contributes a vocabulary, named governance.<id>.

ParameterWhat it is
vthe vocabulary
versionthe extension's version

Returns: the extension, or why its identifier is not one

Imported by 4 tests of the run (4 passed, 0 failed): the library's results

vocabularyPointconstno test imports it
const vocabularyPoint: ContributionPoint<Vocabulary>

The contribution point an extension fills to add a vocabulary.

Titles, headings, exports, tables, columns and requirements. Esc closes.