summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:39:37 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 23:39:37 +0200
commitc09020c2fb01da24d5befbed78ce3b73b5efbe4c (patch)
tree8cd1086588988fafaf238aed8a38a7ec85b0afa3 /man
parent3990586a85e91923c0a3ae1a1f0f61420db555ac (diff)
downloadkrino-c09020c2fb01da24d5befbed78ce3b73b5efbe4c.tar.gz
krino-c09020c2fb01da24d5befbed78ce3b73b5efbe4c.zip
content tests are three-valued: unknown when unreadable or read in part
Diffstat (limited to 'man')
-rw-r--r--man/krino.111
-rw-r--r--man/krino.conf.524
2 files changed, 31 insertions, 4 deletions
diff --git a/man/krino.1 b/man/krino.1
index 000fd95..2761048 100644
--- a/man/krino.1
+++ b/man/krino.1
@@ -193,8 +193,15 @@ checks every included directory.
.It Ic explain Ar file
Evaluate every exclusion and rule of
.Ar file Ns 's
-directory against it and show each test's result, so a rule that should
-match but does not
+directory against it and show each test's result
+.Po
+.Ql yes ,
+.Ql no ,
+or
+.Ql \&?
+for a result that depends on content krino could not read
+.Pc ,
+so a rule that should match but does not
.Pq or the reverse
can be diagnosed test by test.
See
diff --git a/man/krino.conf.5 b/man/krino.conf.5
index 26da541..c2df331 100644
--- a/man/krino.conf.5
+++ b/man/krino.conf.5
@@ -274,11 +274,14 @@ can test size and content.
.Pp
An
.Ic exclude
-fails closed: when a content test it reaches cannot read the file
-.Pq over Ic max-read , No or a tool missing, failing or timing out ,
+fails closed: when its value depends on a content test that cannot read the
+file
+.Pq over Ic max-read , No a tool missing, failing or timing out, or a document read only in part ,
the exclude holds and the file is set aside as
.Dq (content unreadable) ,
with a warning.
+An exclude that is false whatever the text holds does not
+.Pq see Sx Operators .
A file whose format has no text at all, such as an image or an archive,
is not unreadable: its content tests are false, with no warning.
So is a file of no known extension that starts as text and holds binary
@@ -365,6 +368,23 @@ and
take one or more arguments;
.Ic not
exactly one.
+.Pp
+A
+.Ic content
+test that cannot read its file is unknown, with a warning; a document read
+only in part answers the keywords found in what was read and leaves the
+others unknown.
+Operators combine unknowns by three-valued logic:
+.Ic and
+is false if any argument is false,
+.Ic or
+true if any is true, and
+.Ic not
+of unknown is unknown.
+A rule matches only when its condition is true, so
+.Ql (not (content \(dqx\(dq))
+never acts on a file krino could not read; an exclusion holds when its
+condition is true or unknown.
.Ss Tests
.Bl -tag -width Ds
.It Ic (type Ar t No ...)