Repository navigation
Commit f6cb344
authored
docs: stop offering an examples-local type, and drop the counts that keep rotting (#482)
* docs: stop offering an examples-local type, and drop the counts that keep rotting
The example catalogue introduced the cover letter as a `BusinessTheme.modern()`
document. That record lives in the examples module and ships in no artifact, so a
reader who adds the dependency and reaches for it finds nothing to import. The
rows and prose now describe what the examples demonstrate; the advanced section
that quotes the helper says it is examples-local and names `BrandTheme` as the
shipping equivalent.
ExamplesLocalTypeGuardTest bans the factory-call form on any README and leaves
the fence alone — a fence quotes an example's own source, and editing the type
out of a quotation would make it false.
Four counts are removed rather than corrected: the catalogue was "~53 PDFs" with
a "curated 39-PDF subset" where it generates 91 and commits 62, the banner
caption stated a line count for the example it links, and it named the module
graph by a version the image no longer shows. Each had been reconciled before.
The commit-message examples pointed at the 1.5 line while the pull-request
template requires a conventional subject and 26 of the last 30 commits are one.
* docs: say what the cover letter actually uses, and police the form that misled
The replacement sentence was as untrue as the one it replaced: it said the
palette and fonts come from a record the example declares, and the example
imports the shared examples-module helper and calls it. The section now says
the colours come from a helper local to this module and names BrandTheme as
the shipping equivalent.
Three defects in the rule:
- it matched any dot after the type name, so a markdown link to the type's own
source would have failed the build citing a call that was never written. It
now matches a call.
- the bare name in a table row passed, which is the form the defect was
actually written in. A row naming the type is now rejected too; elsewhere in
prose the bare name stays legal, because these pages describe those examples.
- one of the package's five types was listed. The set is read from the source
tree, so the next helper is covered without anyone remembering this file.
The guard-the-guard compared prose against a fixed floor that the fenced
content clears on its own — an inverted split would have passed it. It compares
the two halves instead.
* docs: scan every published page, and every code block that is not a quotation
The rule read one README per module and skipped every fenced block, which left
the two forms most likely to mislead outside it: a nested page under docs/, and
a tutorial snippet — the thing a reader copies rather than reads.
- The scan covers the published documentation, historical records aside: pages
under docs/adr, docs/archive, docs/migration, docs/roadmaps and the v1-classic
templates exist to record what a past release contained, and the decision guide
between the removed and layered surfaces names the old one beside its
replacement on purpose.
- Code blocks are scanned. The one exemption is a fence introduced by a
doc-example-ignore marker, which already carries a written reason and is how a
page quotes an example's own source verbatim. A test asserts that path is still
exercised, so the escape hatch cannot quietly become dead code.
- Construction, method references and member access join the call form. Three
unguarded ways to make the same offer is not a rule.
- An unclosed fence is caught per page. It exempts everything below it, and the
totals cannot see one file going quiet.
The entry describing the removed counts had itself acquired five of them, in a
bullet titled "the last hardcoded counts are gone"; every figure that can drift
before the release is out.1 parent c474c07 commit f6cb344
5 files changed
Lines changed: 277 additions & 13 deletions
File tree
- examples
- qa/src/test/java/com/demcha/documentation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
130 | 149 | | |
131 | 150 | | |
132 | 151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
145 | 146 | | |
146 | 147 | | |
147 | 148 | | |
| |||
1130 | 1131 | | |
1131 | 1132 | | |
1132 | 1133 | | |
1133 | | - | |
| 1134 | + | |
1134 | 1135 | | |
1135 | 1136 | | |
1136 | 1137 | | |
1137 | 1138 | | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
1138 | 1143 | | |
1139 | 1144 | | |
1140 | 1145 | | |
| |||
0 commit comments