Make great documentation goal 1.2, and plan the README's reorganisation and the nested-template gaps #33
@@ -24,7 +24,7 @@
|
||||
before paraphrasing it, and name the register you read before claiming none
|
||||
publishes a spelling.
|
||||
- A README example is a `json` block that loads and renders as a category; `readme_test.go` runs every one.
|
||||
- Cyclomatic complexity is gated at 14. Split a function that would go over it, except a table-shaped dispatch at 14, a switch with one case per kind of its input, which stays whole.
|
||||
- Cyclomatic complexity is gated at 14: split a function that would go over it. A table-shaped dispatch, a switch with one case per kind of its input, may sit at 14 and stays whole.
|
||||
|
||||
# Decisions
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
"github.com/larvit/fejkdata/internal/invariant"
|
||||
)
|
||||
|
||||
// eachNode visits n and every node inside it once, passing fn the label an error names each
|
||||
// by: the dot path reaching it, then ", line N" for a table cell. It never crosses a
|
||||
// reference edge — a {/path} reference is skipped — so a single inline node is walked on
|
||||
// its own.
|
||||
// eachNode visits n and every node inside it once, and passes fn each node with the label an
|
||||
// error uses for it: the dot path reaching it, then ", line N" for a table cell. It never
|
||||
// crosses a reference edge — a {/path} reference is skipped — so a single inline node is
|
||||
// walked on its own.
|
||||
func eachNode(n node, label string, fn func(label string, n node) error) error {
|
||||
seen := map[node]bool{}
|
||||
var visit func(string, node) error
|
||||
|
||||
@@ -436,8 +436,8 @@ func (t *table) proveParent(siblings map[string]node) (*table, error) {
|
||||
return p, nil
|
||||
}
|
||||
|
||||
// checkAncestors refuses a cycle in the chain of parents from p, t's parent, and an ancestor
|
||||
// with a column named like t.
|
||||
// checkAncestors refuses a cycle in the chain of parents starting at p, t's parent, and
|
||||
// refuses an ancestor that has a column named like t.
|
||||
func (t *table) checkAncestors(p *table, siblings map[string]node) error {
|
||||
var ancestors []*table
|
||||
for q, seen := p, map[*table]bool{t: true}; q != nil; q, _ = siblings[q.header[q.parentIndex]].(*table) {
|
||||
|
||||
@@ -469,7 +469,7 @@ Its doc says render failure, and it wraps what `NewTemplate` and `NewRecordTempl
|
||||
|
||||
### 116. Turn a row index into its rows file's line in one function.
|
||||
|
||||
Today `namedNode`'s cell line in `graph.go` and each error in `table.go` add the header line and the one-based count. Item 102 moves the rows into `internal/rows`; the function goes with them.
|
||||
Today `namedNode`'s cell line in `graph.go` and each site in `table.go` add the header line and the one-based count. Item 102 moves the rows into `internal/rows`; the function goes with them.
|
||||
|
||||
### 56. Build on a manual run of `test.yml`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user