IF Commons GitHub

commands/catalogue

Written to: 1 requirement: 1 proved, 0 partly, 0 failing, 0 with no test recorded. 0001-ergonex FR-010

The problem codes of ergonex and what each means (commons 0001-ergonex FR-010; commons headless 0003-headless-output FR-008): every rule that can make a finding is a stable code (E- and the rule's words in capitals), and ergonex explain <code> says what happened, the likely cause and the fix. The catalogue is Headless' data of the program: the mechanism that finds, translates and writes an explanation is Headless', the words are Ergonex's.

A rule is ergonex/<words> (or changes/<words> for a commit message, which commons 0020-ifccm owns), and its code is E- and the words, upper-case, joined by dashes: ergonex/repository-diverged is E-REPOSITORY-DIVERGED. A rule that is made from a word of a union (ergonex/tool-too-old) is one entry for each word. tests prove that every rule written in the sources has an entry here.

import { codeOfRule } from "./catalogue.ts";
codeOfRule("ergonex/repository-diverged"); // "E-REPOSITORY-DIVERGED"

Source: commons/ergonex/src/commands/catalogue.ts

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

CATALOGUEconst
const CATALOGUE: Readonly<Record<string, Explanation>>

The explanation of every code, by code.

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

codeOfRulefunction
function codeOfRule(ruleId: string): string

The code of a rule: E- and the rule's words in capitals, joined by dashes.

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

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