suite retire и проверка словаря в документе для читателя

- suite retire снимает правило, конвенцию или тему: правило остаётся заглушкой
  с датой и причиной, имя уезжает в раздел выбывших, снятие с непогашенными
  ссылками отклоняется с перечнем мест
- добавлена проверка META-30: короткое описание языка обязано называть все
  слова словаря, иначе читатель копии толкует их по памяти
- retired-раздел манифеста больше не считается объявлением пути: снятый
  префикс означает, что файл ушёл вместе с ним
This commit is contained in:
av
2026-07-27 10:51:46 +03:00
parent b29b5b5e6f
commit 5321fba89d
9 changed files with 753 additions and 7 deletions
+16 -1
View File
@@ -58,6 +58,15 @@ prefix: TIME
**ПОЧЕМУ.** Без явного смещения не видно, в какой зоне запись сделана.
`
// reading stands for the short account of the language, the one document about
// it that travels into a copy. It has to name every word of the vocabulary:
// that is the whole of META-30.
const reading = `# Как читать конвенцию
Ключевые слова: ДОЛЖЕН, НЕ ДОЛЖЕН, СЛЕДУЕТ, НЕ СЛЕДУЕТ, ДОПУСКАЕТСЯ.
Метки: ПОЧЕМУ, ПРИМЕРЫ, МЕХАНИЗИРОВАНО, СНЯТО.
`
// files is the content of a suite: a path from the root mapped to the text of
// the file. An empty string means "no such file": that is how a test drops a
// file the base fixture provides.
@@ -67,7 +76,7 @@ func base() files {
return files{
"suite.toml": baseManifest,
"LANGUAGE.md": "# Язык конвенций\n\nОписание языка.\n",
"READING.md": "# Как читать конвенцию\n\nКоротко.\n",
"READING.md": reading,
"conventions/time.md": baseTime,
}
}
@@ -374,6 +383,12 @@ func TestChecks(t *testing.T) {
f["conventions/rules.md"] = "---\nprefix: RULE\n---\n\n# Правила\n\n" + versionLine + "\n"
},
want: "more than one document without a topic",
}, {
name: "the short account of the language lost a word of the vocabulary",
setup: func(f files) {
f["READING.md"] = strings.Replace(reading, ", ДОПУСКАЕТСЯ", "", 1)
},
want: "does not name ДОПУСКАЕТСЯ",
}, {
name: "document without a topic carries layer keys",
setup: func(f files) {