aboutsummaryrefslogtreecommitdiff
path: root/internal/cond/eval_test.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-17 12:11:42 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-17 12:11:42 +0200
commitbddbd74e4a73e8e32bcf648efd1cac5655f6d0cd (patch)
tree187e6a1fb722d9ab97d2076f69f997f5d371e943 /internal/cond/eval_test.go
parentcd7425b81f963a948f0abe7df3f9e58e190c2b78 (diff)
downloadkrino-bddbd74e4a73e8e32bcf648efd1cac5655f6d0cd.tar.gz
krino-bddbd74e4a73e8e32bcf648efd1cac5655f6d0cd.zip
comments that explain the code, not how it was written
About 340 comments cited the development process: task and plan numbers, fix waves, rulings, reviewers, and the author in the third person with a date. None of that exists outside the work itself, so to a reader it pointed at nothing. Each one now states the engineering reason it was standing in front of; where a comment was provenance and nothing else, it is gone. References to docs/design.md and docs/gui-design.md by section stay: both ship with the repository. The design documents lose their amendment diaries - CHANGELOG.md is that record - and the GUI's says plainly that the window has gone further than the document. Only comments changed. Every .go file was parsed and its code printed with comments stripped, before and after: the two hashes are identical across all 175 files.
Diffstat (limited to 'internal/cond/eval_test.go')
-rw-r--r--internal/cond/eval_test.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/internal/cond/eval_test.go b/internal/cond/eval_test.go
index 7ebe038..73e0ea6 100644
--- a/internal/cond/eval_test.go
+++ b/internal/cond/eval_test.go
@@ -231,8 +231,8 @@ func TestNegatedCombinatorReason(t *testing.T) {
// TestEvalReportsUnreadableContent: Result.Unreadable says a content test
// was reached and could not read the file - what lets an exclude fail
-// closed (review M11) - and stays false when evaluation never reached the
-// content test.
+// closed - and stays false when evaluation never reached the content
+// test.
func TestEvalReportsUnreadableContent(t *testing.T) {
f := &fake{name: "a.pdf", rawErr: errors.New("larger than max-read")}
if r := eval(t, `(and (type pdf) (content "x"))`, Options{}, f); r.Match || !r.Unreadable {
@@ -264,8 +264,8 @@ func TestCapturesKeepDiacritics(t *testing.T) {
// is unknown, not false, and and/or/not combine unknowns the way Kleene's
// three-valued logic does: a condition certainly false (or true) whatever
// the text holds is decided, and only one that depends on the text is
-// unknown (plan 11, re-review cache F2). A rule matches only a true
-// condition; an exclude holds on true or unknown.
+// unknown. A rule matches only a true condition; an exclude holds on true
+// or unknown.
func TestUnreadableContentIsUnknown(t *testing.T) {
f := &fake{name: "a.pdf", rawErr: errors.New("larger than max-read")}
cases := []struct {
@@ -289,8 +289,7 @@ func TestUnreadableContentIsUnknown(t *testing.T) {
// TestMatchedIsUnknownAfterAnUnknownRule: when no earlier rule matched but
// one could not be decided, (matched) is unknown, so a later
-// (not (matched)) does not act on a file krino could not read (plan 11
-// review L6).
+// (not (matched)) does not act on a file krino could not read.
func TestMatchedIsUnknownAfterAnUnknownRule(t *testing.T) {
f := &fake{name: "a.docx", matchedUnknown: true}
if r := eval(t, `(not (matched))`, Options{}, f); r.Match || !r.Unreadable {
@@ -303,7 +302,7 @@ func TestMatchedIsUnknownAfterAnUnknownRule(t *testing.T) {
}
// TestFailedDuplicateLookupIsUnknown: a duplicate test whose lookup fails is
-// unknown, like unreadable content, and says why (plan 12).
+// unknown, like unreadable content, and says why.
func TestFailedDuplicateLookupIsUnknown(t *testing.T) {
f := &fake{name: "a.pdf", dupErr: errors.New("~/dl/a.pdf: open: permission denied")}
for _, c := range []struct {