aboutsummaryrefslogtreecommitdiff
path: root/docs/design.md
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-15 22:18:06 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-15 22:18:06 +0200
commit1a1dc05b5250c6a281736fa6b706f74721f83847 (patch)
treee9dda722cebf25d1cb98894c82ad24045a5a8ea4 /docs/design.md
parent88cbe4e623eab9adb608566ac636d36eed72e551 (diff)
downloadkrino-1a1dc05b5250c6a281736fa6b706f74721f83847.tar.gz
krino-1a1dc05b5250c6a281736fa6b706f74721f83847.zip
krino.conf(5): WRITING RULES guide; reference corrected against the code
Diffstat (limited to 'docs/design.md')
-rw-r--r--docs/design.md12
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/design.md b/docs/design.md
index bf8eca0..9479914 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -274,8 +274,12 @@ UTF-8 is replaced by U+FFFD before folding.
rule matches only when its condition is true; an unknown exclude holds
(§4.6). While no earlier rule has matched a file but one could not be
decided, `(matched)` is unknown too, so a catch-all
- `(not (matched))` does not take the file. `explain` shows an unknown test as `?`. A format with no text (§6,
- "anything else") is not a failure: `content` is false, silently.
+ `(not (matched))` does not take the file, and a rule with `(stop)` whose
+ condition is unknown ends the search for the file. A `duplicate` test
+ whose lookup fails is unknown in the same way (an exclude holds, marked
+ "(duplicate check failed)"). `explain` shows an unknown test as `?` and an
+ undecided rule as "undecided". A format with no text (§6, "anything
+ else") is not a failure: `content` is false, silently.
### 5.5 Duplicates
@@ -450,7 +454,9 @@ Captures come from the first `name` test, not inside a `not`, that was true
while evaluating this rule. Tests of equal cost keep their written order, so
"first" is well defined. `krino check` rejects a rule that uses `{N}` unless
every such `name` test in it has at least N groups, and a rule that uses
-`{N}` with no `name` test at all.
+`{N}` with no `name` test at all. It also rejects any placeholder that
+could never expand: an unknown name, `{mtime}` or `{now}` without a format,
+an unknown format code, `{0}`, `{10}` and up, an unclosed `{`.
With `fold` on, a `name` test matches the folded name, but its captures are
the original name's characters: `(name "^(.+)-faktura")` on